@thi.ng/pixel
Version:
Typedarray integer & float pixel buffers w/ customizable formats, blitting, drawing, convolution
31 lines • 1.28 kB
TypeScript
import type { NumericArray } from "@thi.ng/api";
/**
* Creates an indexed color {@link IntFormat} using the provided palette (in
* {@link ARGB8888} or {@link ABGR8888} formats, max. 256 colors).
*
* @remarks
* If `isABGR` is false (default), the palette colors are assumed to be in ARGB
* order. When converting colors to indices, palette indices are chosen via the
* minimum cartesian distance.
*
* @param palette -
* @param isABGR -
*/
export declare const defIndexed8: (palette: NumericArray, isABGR?: boolean) => import("../api.js").IntFormat;
/**
* Similar to {@link defIndexed8}, but for 16bit palette sizes and pixel buffers.
*/
export declare const defIndexed16: (palette: NumericArray, isABGR?: boolean) => import("../api.js").IntFormat;
/**
* Similar to {@link defIndexed8}, but for 32bit palette sizes and pixel buffers.
*/
export declare const defIndexed32: (palette: NumericArray, isABGR?: boolean) => import("../api.js").IntFormat;
/**
* Similar to {@link defIndexed8}, but dynamically decides about pixel buffer
* bit depth based on size of given palette.
*
* @param palette -
* @param isABGR -
*/
export declare const defIndexed: (palette: NumericArray, isABGR?: boolean) => import("../api.js").IntFormat;
//# sourceMappingURL=indexed.d.ts.map