Png.png.decode.info: def of gralha-png-decode@0.1.0.1 Import: import gralha-png-decode@0.1.0.1/png.bend as Png Lines 189-192 of gralha-png-decode@0.1.0.1/png.bend: https://jend.leeeet.dev/read.txt?path=gralha-png-decode@0.1.0.1/png.bend&start_line=189&end_line=192 import Base import gralha-text-scan@0.1.0.1/scan.bend as U import gralha-bytes@0.1.0.1/bytes.bend as Bin import gralha-image@0.1.0.1/image.bend as Img def png.decode.info(+info: PNGInfo) -> Img.Picture: PNGInfo{w, h, depth, kind, interlace, palette, alpha, compressed, valid} = info +passes = png.passes(U.choose(Nat, U32.is_eq(interlace, 1), 7n, 1n), info, 0, 0) U.branch(Img.Picture, png.valid(info), _ => png.inflate(Bin.zlib(compressed, png.passes.bytes(passes, 0)), info, passes), _ => Img.Picture{0, 0, 0n, Img.Flat{Img.clear()}}) Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=gralha-bytes@0.1.0.1/bytes.bend&name=zlib https://jend.leeeet.dev/definition.txt?path=gralha-image@0.1.0.1/image.bend&name=Picture https://jend.leeeet.dev/definition.txt?path=gralha-image@0.1.0.1/image.bend&name=Pixels https://jend.leeeet.dev/definition.txt?path=gralha-image@0.1.0.1/image.bend&name=clear https://jend.leeeet.dev/definition.txt?path=gralha-png-decode@0.1.0.1/png.bend&name=PNGInfo https://jend.leeeet.dev/definition.txt?path=gralha-png-decode@0.1.0.1/png.bend&name=png.inflate https://jend.leeeet.dev/definition.txt?path=gralha-png-decode@0.1.0.1/png.bend&name=png.passes https://jend.leeeet.dev/definition.txt?path=gralha-png-decode@0.1.0.1/png.bend&name=png.passes.bytes https://jend.leeeet.dev/definition.txt?path=gralha-png-decode@0.1.0.1/png.bend&name=png.valid https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=branch https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=choose