Jpeg.jpeg.decode.frame: def of gralha-jpeg-decode@0.1.0.1 Import: import gralha-jpeg-decode@0.1.0.1/jpeg.bend as Jpeg Lines 742-746 of gralha-jpeg-decode@0.1.0.1/jpeg.bend: https://jend.leeeet.dev/read.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&start_line=742&end_line=746 import Base import gralha-text-scan@0.1.0.1/scan.bend as U import gralha-image@0.1.0.1/image.bend as Img def jpeg.decode.frame(+frame: JPEGFrame) -> Img.Picture: JPEGFrame{w, h, hm, vm, progressive, components, quants, huffs, restart, adobe, valid} = frame +depth = Img.picture.depth(U.choose(U32, U32.is_gt(w, h), w, h), 1, 0n) U.branch(Img.Picture, valid && U32.is_gt(w, 0) && U32.is_gt(h, 0) && jpeg.components.complete(components), _ => Img.Picture{w, h, depth, jpeg.paint(U32.to_nat((w * h : U32)), 0, w, h, hm, vm, jpeg.idct.components(components, quants), U.choose(U32, U32.is_eq(adobe, 255) && jpeg.rgb.ids(components), 0, adobe), depth, Img.Flat{Img.clear()})}, _ => Img.picture.blank()) Uses (18): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_gt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat 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-image@0.1.0.1/image.bend&name=picture.blank https://jend.leeeet.dev/definition.txt?path=gralha-image@0.1.0.1/image.bend&name=picture.depth https://jend.leeeet.dev/definition.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&name=JPEGFrame https://jend.leeeet.dev/definition.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&name=jpeg.components.complete https://jend.leeeet.dev/definition.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&name=jpeg.idct.components https://jend.leeeet.dev/definition.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&name=jpeg.paint https://jend.leeeet.dev/definition.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&name=jpeg.rgb.ids 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