def png.paint

gralha-png-decode@0.1.0.1 · png.bend:160

import gralha-png-decode@0.1.0.1/png.bend as Png
import Base
import gralha-bytes@0.1.0.1/bytes.bend as Bin
import gralha-image@0.1.0.1/image.bend as Img

160def png.paint(result: Maybe<&2, Bin.Bytes>, info: PNGInfo, +pass: PNGPass, depth: Nat, pixels: Img.Pixels, next: Img.Pixels -> Maybe<&2, Img.Pixels>) -> Maybe<&2, Img.Pixels>:
161  match result:
162    case None{}: None{}
163    case Some{raw}:
164      PNGPass{w, h, x, y, dx, dy, stride, offset} = pass
165      next(png.paint.rows(U32.to_nat(h), 0, info, raw, pass, depth, pixels))
166
167@unsafe

Uses (8)

Used by (1)