UNPKG

s2-tools

Version:

A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.

53 lines 1.76 kB
import type { Raster } from './image'; /** * Converts photometric interpretation to samples * @param pi - photometric interpretation * @param bitsPerSample - bits per sample * @param extraSamples - extra samples * @returns - sample output */ export declare function buildSamples(pi?: number, bitsPerSample?: number[], extraSamples?: number): number[]; /** * Convert color space raster to RGB * TODO: ICCLAB, ITULAB * @param pi - photometric interpretation * @param rasterData - raster data * @param max - maximum value if needed * @param colorMap - color map if needed */ export declare function convertColorSpace(pi: number | undefined, rasterData: Raster, max: number, colorMap?: number[]): void; /** * Converts raster with white is zero and max is one to RGB * @param raster - raster * @param max - maximum value */ export declare function fromWhiteIsZero(raster: Raster, max: number): void; /** * Converts raster with black is zero and max is one to RGB * @param raster - raster * @param max - maximum value */ export declare function fromBlackIsZero(raster: Raster, max: number): void; /** * Converts raster with a color map to RGB * @param raster - raster * @param colorMap - color map */ export declare function fromPalette(raster: Raster, colorMap: number[]): void; /** * Converts CMYK to RGB * @param raster - CMYK raster */ export declare function fromCMYK(raster: Raster): void; /** * Converts YCbCr to RGB * @param raster - YCbCr raster */ export declare function fromYCbCr(raster: Raster): void; /** * Converts CIELab to RGB * https://github.com/antimatter15/rgb-lab/blob/master/color.js * @param raster - CIELab raster */ export declare function fromCIELab(raster: Raster): void; //# sourceMappingURL=color.d.ts.map