@thi.ng/pixel
Version:
Typedarray integer & float pixel buffers w/ customizable formats, blitting, drawing, convolution
20 lines (19 loc) • 419 B
JavaScript
import { identity } from "@thi.ng/api/fn";
import { Lane } from "../api.js";
import { defIntFormat } from "./int-format.js";
const ABGR8888 = defIntFormat({
type: "u32",
size: 32,
alpha: 8,
channels: [
{ size: 8, lane: Lane.ALPHA },
{ size: 8, lane: Lane.BLUE },
{ size: 8, lane: Lane.GREEN },
{ size: 8, lane: Lane.RED }
],
fromABGR: identity,
toABGR: identity
});
export {
ABGR8888
};