UNPKG

@thi.ng/pixel

Version:

Typedarray integer & float pixel buffers w/ customizable formats, blitting, drawing, convolution

17 lines (16 loc) 349 B
import { Lane } from "../api.js"; import { defIntFormat } from "./int-format.js"; const BGR888 = defIntFormat({ type: "u32", size: 24, channels: [ { size: 8, lane: Lane.BLUE }, { size: 8, lane: Lane.GREEN }, { size: 8, lane: Lane.RED } ], fromABGR: (x) => x & 16777215, toABGR: (x) => 4278190080 | x }); export { BGR888 };