def png.predict

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

import gralha-png-decode@0.1.0.1/png.bend as Png
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U

67def png.predict(+kind: U32, +a: U32, +b: U32, +c: U32) -> U32:
68  U.choose(U32, U32.is_eq(kind, 1), a, U.choose(U32, U32.is_eq(kind, 2), b, U.choose(U32, U32.is_eq(kind, 3), ((a + b) / 2 : U32), U.choose(U32, U32.is_eq(kind, 4), png.paeth(a, b, c), 0))))

Uses (6)

Used by (1)