Png.png.depth.valid: def of gralha-png-decode@0.1.0.1 Import: import gralha-png-decode@0.1.0.1/png.bend as Png Lines 50-52 of gralha-png-decode@0.1.0.1/png.bend: https://jend.leeeet.dev/read.txt?path=gralha-png-decode@0.1.0.1/png.bend&start_line=50&end_line=52 import Base import gralha-text-scan@0.1.0.1/scan.bend as U def png.depth.valid(+kind: U32, +depth: U32) -> Bool: +small = U32.is_eq(depth, 1) || U32.is_eq(depth, 2) || U32.is_eq(depth, 4) || U32.is_eq(depth, 8) U.choose(Bool, U32.is_eq(kind, 0), small || U32.is_eq(depth, 16), U.choose(Bool, U32.is_eq(kind, 3), small, (U32.is_eq(kind, 2) || U32.is_eq(kind, 4) || U32.is_eq(kind, 6)) && (U32.is_eq(depth, 8) || U32.is_eq(depth, 16)))) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or 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-text-scan@0.1.0.1/scan.bend&name=choose