Flex - 以更高 dpi 保存图像
在Flex中,我使用graphics.codec.JPEGEncoder来保存在应用程序内部编辑的图像文件(正常操作,如亮度等),我能够完美地保存文件。我想知道有什么方法可以以更好的 dpi 保存图像吗?比如说,加载和操作的图像最初是 72dpi,现在我可以用 150 或 300 dpi 保存它吗?如果是这样,该怎么办。
不必使用 JPEGEncoder,如果有任何方法可以做到这一点,例如使用任何库等,我对此表示同意。有什么建议吗?
注意:如果重要的话,我使用 Bitmapdata 来存储图像和操作,并通过将其数据提供为字节数组来使用 JPEGEncoder 保存图像,如下所示。
var imageBytes:ByteArray = encoder.encode(myBitmapData);
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);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您说要将 72 dpi 图像保存为 150 或 300 dpi 图像,那么在您的情况下它本质上应该是放大,并且您必须使用类似 双三次插值 为此。
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.