使用装载器装入.BMP(位图)和.TIFF文件中的Flash 10 [英] Loading .bmp (Bitmap) and .tiff file in Flash 10 using a Loader
问题描述
我正在开发使用Flash 10图片上传。
我使用的FileReference
对象浏览图像和装载机来显示图像:
I am developing a Image uploader using Flash 10.
I am using FileReference
object to browse images and Loader to show the image:
样品code:
var tempFileRef:FileReference = FileReference(ev.target);
var oLoader:Loader = new Loader();
oLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoad);
oLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
oLoader.loadBytes(tempFileRef.data);
它工作正常的 .JPG 和 .gif注意:文件,但是当我浏览.BMP或.TIFF文件,我得到的错误:
It works fine with .jpg and .gif files but when I browse .bmp or .tiff file, I am getting the error:
Error #2124: Loaded file is an unknown type.
有没有办法来加载和桌面显示浏览.BMP图像?
Is there a way to load and display browsed .bmp images from desktop?
感谢
推荐答案
BMPDe codeR从星火LIB类: 的http://www.libspark.org/svn/as3/BMPDe$c$cr/src/com/voidelement/images/BMPDe$c$cr.as
BMPDecoder class from Spark lib: http://www.libspark.org/svn/as3/BMPDecoder/src/com/voidelement/images/BMPDecoder.as
的使用示例: http://hi.baidu.com/leyhui /blog/item/d12be8b116ec915308230298.html
对于TIFFDe codeR,它的工作仍然在进行中,但非常有前途的:
Regarding TIFFDecoder, it is still work in progress, but very promising one:
HTTP://$c$c.google.com/p / windowsbitmapden codeR /
这篇关于使用装载器装入.BMP(位图)和.TIFF文件中的Flash 10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!