关于Flex中图像处理的一些问题
这就是我想做的。应用程序运行时默认加载图像。有一种方法可以通过指定 url 来加载用户想要的另一张图像。加载用户定义的图像时,默认图像仍然在后台,并且有一些方法可用于在整个图像上应用一些过滤器(我的意思是具有默认图像和用户加载图像的结果图像)混合),然后我想将最终图像保存为 jpg 或 png。
现在,我仍然是 Flex 的初学者,对所有画布、图像控件、位图数据等都感到困惑。我需要帮助的是实现我想要的最好方法是什么?我应该将默认图像加载到带有 url/embed 的图像中还是应该将其加载为 BitmapData,如何加载第二个用户定义的图像?混合两个图像的最佳方法是什么?
Here's what I want to do. An image is loaded by default when the app is run. There is a way to load another image the user wants by specifying an url. When the user defined image is loaded, the default image is still in the background and there are some method that would be used to apply some filters on the image as a whole (I mean the resultant image with both the default and the user loaded image blended) and then I want to save the final image as jpg or png.
Now, I am still a beginner at Flex, and getting all confused with all the canvas, image control, bitmapdata etc. Where I want help is what's the best way to implement what I want? Should I load the default image into an Image with url/embed or should I load it as a BitmapData, how do I load the second user defined image? Whats the best way to blend the two images?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将默认图像保留为嵌入图像,并检索其
BitmapData
以进一步使用。加载用户定义的图像时,您检索其
BitmapData
,并在用户定义的图像上绘制嵌入图像:然后您可以将生成的
BitmapData
实例保存到本地文件系统:You can leave the default image as embedded one, and retrieve its
BitmapData
to work with further.When the user-defined image is loaded, you retrieve its
BitmapData
, and draw the embedded image over the user-defined one:Then you can save the resulting
BitmapData
instace to the local file system: