用于未初始化组件的 Flex BitmapData 或 ImageSnapshot
我想通过捕获 Flex 应用程序中某些未初始化组件的 BitmapData
或 ImageSnapshot
来制作某种缩略图。
是否可以?
预先感谢!
米。
I would like to make some kind of thumbnail with capturing BitmapData
or ImageSnapshot
of some UNINITIALIZED components in my Flex application.
Is it possible?
Thanks in advance!
m.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不,我相信如果组件未初始化,您最终会得到空引用(图形和其他内容都将未初始化)。您可以简单地初始化组件,但将它们隐藏并获取缩略图。
No. I believe you will end up getting null references if the components are not initialized (The graphics and stuff will all be uninitialized). You can simply initialize the components but make them hidden and take a thumbnail.
@CookieOfFortune
感谢您的帮助,伙计=)
我尝试在我的主应用程序中制作类似的东西
_32 是我想要获取缩略图的组件。
tempHolder
是Canvas
,testImg
是Image
类。tempHolder
显示我想要捕获的内容,而testImg
在我的情况下始终是白色...我不明白 =)
再次感谢;-)
@CookieOfFortune
Thanks for help man =)
I tried to make something like this in my main application
_32 is my component which I would like to take thumbnail.
tempHolder
isCanvas
,testImg
isImage
class.tempHolder
displays what I want to capture, whiletestImg
in my case is always white...I don't understand it =)
Thanks one more time ;-)
@Jasconius,我使用了您描述的技术来创建导入内容的缩略图到 AIR 应用程序中,构建所有例程很麻烦,但最终我对这个解决方案感到满意。我用它来从图像、视频和模块创建缩略图(每个都有不同的容器和加载和卸载素材的例程),
这样做的好处是,当您构建缩略图创建器组件时 - 您可以将其放置在应用程序来查看发生了什么。稍后,当您确定一切正常时,您可以将缩略图创建器设置为-10000、-10000,然后忘记它。
@Jasconius I used the technique you describe for creating thumbnails of imported stuff into an AIR app and it's a drag to build all the routines, but in the end I'm satisfied with this solution. I use it for creating thumbnails from images, video and modules (with each a different container and routines to load and unload the footage)
The good part of this is that when you are building your thumbnailcreatorComponent - you can position it in the viewarea of the app to see what's going on. Later, when you are sure that everything works fine, you can put the thumbnailCreator at -10000,-10000 and forget about it.