Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flex - Save image with higher dpi

In Flex, I am using graphics.codec.JPEGEncoder to save image files that are edited inside application (normal manipulations like brightness etc.) I am able to save files perfectly. What I want to know is that is there any way I can save the image with a better dpi? Say, for instance the image that is loaded and manipulated was originally of 72dpi, now can I save it with a dpi of 150 or 300 ? If so, how to do it.

Doesn't have to be using the JPEGEncoder, if there's any way to do it at all, like using any library etc, I am okay with it. Any suggestions?

Note: If it matters, I am using Bitmapdata to store the image and manipulations and saving the image with JPEGEncoder by supplying it's data as bytearray like below.

var imageBytes:ByteArray = encoder.encode(myBitmapData);
like image 843
redGREENblue Avatar asked Jan 17 '26 00:01

redGREENblue


1 Answers

If you say you want to save a 72 dpi image as 150 or 300 dpi image, then it should be in your case essentially an enlargement and you have to use something like bicubic interpolation for this.

like image 175
splash Avatar answered Jan 19 '26 20:01

splash



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!