Jpeg.jpeg.color: def of gralha-jpeg-decode@0.1.0.1 Import: import gralha-jpeg-decode@0.1.0.1/jpeg.bend as Jpeg Lines 710-727 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=710&end_line=727 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.color(xs: List<&2, F32>, +adobe: U32) -> Img.Color: match xs: case Con{gray, Nil{}}: +v = jpeg.channel(gray) Img.Color{v, v, v, 1.0} case Con{a, Con{b, Con{c, Nil{}}}}: +aa = a +bb = b +cc = c U.choose(Img.Color, U32.is_eq(adobe, 0), Img.Color{jpeg.channel(aa), jpeg.channel(bb), jpeg.channel(cc), 1.0}, jpeg.ycbcr(aa, bb, cc)) case Con{a, Con{b, Con{c, Con{k, Nil{}}}}}: +aa = a +bb = b +cc = c +kk = k U.branch(Img.Color, U32.is_eq(adobe, 2), _ => jpeg.ycck(jpeg.ycbcr(aa, bb, cc), kk), _ => Img.Color{jpeg.channel((aa * kk / 255.0 : F32)), jpeg.channel((bb * kk / 255.0 : F32)), jpeg.channel((cc * kk / 255.0 : F32)), 1.0}) case _: Img.clear() Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List 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=gralha-image@0.1.0.1/image.bend&name=Color 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-jpeg-decode@0.1.0.1/jpeg.bend&name=jpeg.channel https://jend.leeeet.dev/definition.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&name=jpeg.ycbcr https://jend.leeeet.dev/definition.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&name=jpeg.ycck 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