使用actionscript将favicon转换为png?
使用actionscript 3,如何将网站的图标转换为16x16 .png 文件?
此解决方案不得访问在线服务,例如 http://www .google.com/s2/favicons?domain=
Using actionscript 3, how can I convert the favicon of a website to a 16x16 .png file?
this solution must specifically NOT access online services such as http://www.google.com/s2/favicons?domain=
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我采取的方法是将 ico 文件(假设您的图标是 ico 文件)作为 BitmapData 引入。然后将位图数据格式化为 PNG 文件。以下是我发现的一些链接可以做到这一点。或者,您可以构建自己的解决方案,但这肯定是一个漫长的过程。
将 ico 文件导入为位图:
http://ntt.cc/2008/10/02/using-icodecoder-class-to-read-ico-file-and-display-it-as-bitmap-in-actionscript.html< /a>
从位图数据生成 PNG 文件:
http://www.kaourantin.net/2005/10/png-encoder-in-as3.html
The approach I would take is to bring in the ico file (assuming your favicons are ico files) as BitmapData. Then format the bitmap data as a PNG file. Here are some links I found to do just that. Alternatively, you could build your own solution but that would certainly be the long way round.
Importing ico files as bitmaps:
http://ntt.cc/2008/10/02/using-icodecoder-class-to-read-ico-file-and-display-it-as-bitmap-in-actionscript.html
Generating a PNG file from bitmap data:
http://www.kaourantin.net/2005/10/png-encoder-in-as3.html