def jpeg.paint

gralha-jpeg-decode@0.1.0.1 · jpeg.bend:729

import gralha-jpeg-decode@0.1.0.1/jpeg.bend as Jpeg
import Base
import gralha-image@0.1.0.1/image.bend as Img

729def jpeg.paint(n: Nat, +index: U32, +w: U32, +h: U32, +hm: U32, +vm: U32, +components: List<&2, JPEGComponent>, +adobe: U32, +depth: Nat, out: Img.Pixels) -> Img.Pixels:
730  match n:
731    case 0n: out
732    case 1n+d:
733      +x = (index % w : U32)
734      +y = (index / w : U32)
735      jpeg.paint(d, U32.inc(index), w, h, hm, vm, components, adobe, depth, Img.pixels.set(out, depth, x, y, jpeg.color(jpeg.sample.channels(components, w, h, hm, vm, x, y), adobe)))

Uses (11)

Used by (1)