简体   繁体   English

如何使用HTML / JavaScript在Adobe Air中显示图标文件

[英]How to display icon file in Adobe Air with HTML/JavaScript

I have File.icon - bitmap data object. 我有File.icon-位图数据对象。 How I can display it in a window with HTML/JavaScript? 如何使用HTML / JavaScript在窗口中显示它? I have found a suitable example for XML/ActionScript: http://blogs.warwick.ac.uk/stevencarpenter/entry/air_using_native/ I have tried to display it with tag <object type = "application/x-shockwave-flash"> including <mx:Image source = "..."/> . 我找到了适合XML / ActionScript的示例: http : //blogs.warwick.ac.uk/stevencarpenter/entry/air_using_native/我试图用标记<object type = "application/x-shockwave-flash">显示它<object type = "application/x-shockwave-flash">包括<mx:Image source = "..."/> But has received only white rectangle. 但是只收到白色矩形。

Either cache it to disk and reload it with a normal HTML img tag or convert the bitmapData to a data URL. 可以将其缓存到磁盘并使用普通的HTML img标签重新加载,也可以将bitmapData转换为数据URL。

Oh, and you could probably copy the image pixels to an HTML canvas object. 哦,您可能可以将图像像素复制到HTML canvas对象。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM