Flex 3.4 - imageSnapshot 问题,链接图像~
经过早些时候的一些可爱的帮助,我几乎完成了我正在做的项目。我以为我已经完成了,但我却遇到了最后一个问题。我的程序对文件的最终输出进行了屏幕截图,并且文件的最终输出包含一些来自其中 URL 的链接图像。现在,当图像被排除时,它保存得很好,但是当我从网址加载图像时,它似乎不允许我的 imageSnapShot 工作。
private function takeSnapshot(even:Event=null):void {
var imageSnap:ImageSnapshot = ImageSnapshot.captureImage(previewMode);
var MyFile:FileReference = new FileReference();
MyFile.save(imageSnap.data, 'profile.png');
}
其中“previewMode”是组件,我正在获取(视图堆栈)的屏幕转储,里面有一些来自网站的链接图像。
通过一些测试,它似乎停止了 -
var imageSnap:ImageSnapshot = ImageSnapshot.captureImage(previewMode);
所以它实际上并没有获得输出的图像。任何帮助将不胜感激,到目前为止你们都很棒。
After some lovely help here earlier Ive almost finished the project Im working on. I thought i had it completed but Ive gone and ran into one final issue. My program takes a screenshot of the final output of my file, and the final output of my file has some linked images from URLs inside of it. Now when the images are excluded, it saves just fine, but when i load in an image from a web address it doesnt seem to allow my imageSnapShot to work.
private function takeSnapshot(even:Event=null):void {
var imageSnap:ImageSnapshot = ImageSnapshot.captureImage(previewMode);
var MyFile:FileReference = new FileReference();
MyFile.save(imageSnap.data, 'profile.png');
}
Where "previewMode" is the component Im taking a screendump of (a viewstack) and inside there are some linked images from websites.
Through some testing it seems to stop on -
var imageSnap:ImageSnapshot = ImageSnapshot.captureImage(previewMode);
So it isnt actually getting the image of the output. Any help would be greatly apperciated, you have all been wonderful so far.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ImageSnapshot.captureImage
可能正在使用BitmapData.draw()
方法来拍摄快照。此方法的 livedocs 页面说:您的文件中有一些来自 URL 的链接图像。显然这是不允许的。请查看 Security.allowDomain一个可能的解决方法。如果您有外部图像这些规则也适用。
ImageSnapshot.captureImage
might be using theBitmapData.draw()
method to take the snap shot. The livedocs page on this method says that:Your file has some linked images from URLs inside it. Apparently that's not allowed. Check out Security.allowDomain for a possible work around. If you have external images these rules also apply.