magica
Version:
ImageMagick for browser and Node.js, easy setup, high level API and Command Line Interface, including WASM binary for an easy setup.
26 lines (25 loc) • 1.01 kB
TypeScript
import { File } from '../file/file';
import { IFile, Rgba } from '../types';
/**
* Returns given rgba image x,y pixel. If the image is not rgba the behavior is undefined.
*/
export declare function getRgbaPixel(f: File, x: number, y: number): Rgba;
export declare function coordsToIndex(width: number, x: number, y: number): number;
export declare function getPixels(f: File): Promise<Rgba[]>;
export declare function imagePixelColor(img: IFile | undefined, x: number, y: number): Promise<string | undefined>;
export declare function rgbaToString(c: Rgba): string;
export declare function isRgbaImage(f: File): boolean | 0 | undefined;
export declare function colorCount(img: IFile | undefined): Promise<number | undefined>;
export declare function parseConvertVerbose(stdout: string[]): {
inputName: string;
outputName: string;
inputFormat: string;
inputSize: {
width: number;
height: number;
};
outputSize: {
width: number;
height: number;
};
}[];