开发者

Loader won't load large images

I have some pretty large PNG images stored in a database (example 1000x15000 px, 4.5MB). I am trying to load this using the Loader class...the problem I am having is when I call load(), nothing happens. No events, no errors.

I can take the same image and embed it. As long as as I set the height to 开发者_JAVA百科less than 8000px it works fine. If I convert the embedded image to a ByteArray and try to load it, nothing happens.

Any suggestions?


In AIR 1.5 and Flash Player 10, the maximum size for a BitmapData object is 8,191 pixels in width or height, and the total number of pixels cannot exceed 16,777,215 pixels. (So, if a BitmapData object is 8,191 pixels wide, it can only be 2,048 pixels high.) In Flash Player 9 and earlier and AIR 1.1 and earlier, the limitation is 2,880 pixels in height and 2,880 in width.

source: flash.display.BitmapData


Well, it looks like there wasn't any way around the Flash limitation. What I ended up doing was coding up a very simple servlet which serves up the image, and then displaying the image in an HTML component.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜