code wiki / (root) / nx_color_meter.nx

nx_color_meter.nx

buildroot/runtime/nx_color_meter.nx

3462 B75 linesdepth 0pulls 0 transitivereach 1 importersview sourcekind librarytopic color
docsdependenciesstructsconstsfunctions

about

nx_color_meter.nx -- Calculates CMYK toner coverage from an RGB bitmap and estimates remaining toner based on page yield.

dependencies 0 imports · 1 importers

nx_color_meter.nx nx_color_meter_test.nx

imports: none

imported by: nx_color_meter_test.nx

structs

none

consts

2const NX_MAGIC_1000000: i64 = 1000000
3const NX_MAGIC_50000: i64 = 50000
4const NX_MAGIC_10000: i64 = 10000
14const NX_CMY_C: i64 = 0
15const NX_CMY_M: i64 = 1
16const NX_CMY_Y: i64 = 2
17const NX_CMY_K: i64 = 3
66const NX_CSUP_OK: i64 = 1
67const NX_CSUP_LOW: i64 = 2
68const NX_CSUP_EMPTY: i64 = 3
69const NX_CSUP_UNKNOWN: i64 = 4

functions

22func nx_color_coverage(rgb: *u8, npix: i64, out4: *i64) -> i64
called by 1: main
57func nx_color_remaining_bp(yield_pages: i64, consumed_ppm: i64) -> i64
called by 1: main
70func nx_color_status(remaining_bp: i64) -> i64
called by 1: main