I’m trying to extract a PNG from a zip (html5 target).
I’ve tried this zip lib (but maybe there is a 100% openfl solution?), and I’m able to get an xml fromt the zip but I can’t load any PNG (well the bytes are loaded but my BitmapData has width/height of 0 so it is incorrect).
var entries = new StringMap<ZipEntry>();
var zip = new ZipReader(bytes);
var entry:ZipEntry;
while ( (entry = zip.getNextEntry()) != null )
{
entries.set(entry.fileName, entry);
}
var myBytes = Zip.getBytes(entries.get("flipped_left.png"));//it's using lime.utils.compress.Deflate.decompress()
var bm = BitmapData.fromBytes(myBytes);
trace(bm.width);//trace 0
var b = new Bitmap(bm, PixelSnapping.AUTO, true);
addChild(b);
Any clue? Thanks