UNPKG

@thi.ng/pixel

Version:

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

20 lines (19 loc) 437 B
import { Lane } from "../api.js"; import { __swapLane13 } from "../internal/utils.js"; import { defIntFormat } from "./int-format.js"; const ARGB8888 = defIntFormat({ type: "u32", size: 32, alpha: 8, channels: [ { size: 8, lane: Lane.ALPHA }, { size: 8, lane: Lane.RED }, { size: 8, lane: Lane.GREEN }, { size: 8, lane: Lane.BLUE } ], fromABGR: __swapLane13, toABGR: __swapLane13 }); export { ARGB8888 };