In AS3, I am loading a png from a zip file (nochump's zip library through ByteArray to Loader). The开发者_C百科 png can be up to 45k pixels wide but only 120 tall. This creates a problem in flash, as images can only be ~8000 pixels wide. A possible solution would be to split the images into 6 columns somehow. This would probably need to be done in the ByteArray state, because the limitation is in Bitmap and Loader. Would this even be possible?
I believe you should use Alchemy to decode such a large file and put it in a Byterray
. It looks like it has been done for JPEG, PNG shouldn't be very different!
http://segfaultlabs.com/devlogs/alchemy-loading-large-jpeg-images
All things are possible since you have the bytes. However this would require you to write a complete png library in actionscript. PNG is a very complicated and sophisticated compressed image format, so you can't just shred the image into blocks by copying portions of the ByteArray.
So really, the answer is no, it is not possible. Sorry.
If it was an uncompressed BMP on the other hand you would be in with a chance. However I suspect that if you are able to change the format of the file, it would be easier to pre-split the image into columns.
精彩评论