public static global::ugiflib.UGifFile read(global::haxe.io.Bytes source) { unchecked { object data = new global::format.gif.Reader(((global::haxe.io.Input)(new global::ugiflib.CSInput(((global::haxe.io.Bytes)(source)))))).read(); int fc = global::format.gif.Tools.framesCount(data); int width = ((int)(global::haxe.lang.Runtime.getField_f(global::haxe.lang.Runtime.getField(data, "logicalScreenDescriptor", 2032764644, true), "width", 1247983110, true))); int lineWidth = ((width * fc) * 4); int height = ((int)(global::haxe.lang.Runtime.getField_f(global::haxe.lang.Runtime.getField(data, "logicalScreenDescriptor", 2032764644, true), "height", 38537191, true))); global::haxe.io.Bytes outBytes = global::haxe.io.Bytes.alloc((((fc * width) * height) * 4)); global::ugiflib.UGifFile file = new global::ugiflib.UGifFile(outBytes, width, height, fc); { int _g1 = 0; int _g = fc; while ((_g1 < _g)) { int i = _g1++; object gce = global::format.gif.Tools.graphicControl(data, i); global::haxe.io.Bytes frameData = global::format.gif.Tools.extractFullRGBA(data, i); { int _g3 = 0; int _g2 = height; while ((_g3 < _g2)) { int j = _g3++; outBytes.blit(((lineWidth * (((height - j) - 1))) + ((width * i) * 4)), frameData, ((j * width) * 4), (width * 4)); } } if ((gce == null)) { file.frames[i] = 1; } else { file.frames[i] = ((int)(global::haxe.lang.Runtime.getField_f(gce, "delay", 1462163331, true))); } } } return(file); } }
protected static void __hx_ctor_format_gif_Reader(global::format.gif.Reader __hx_this, global::haxe.io.Input i) { __hx_this.i = i; i.set_bigEndian(false); }