image-js
Version:
Image processing and manipulation in JavaScript
36 lines • 1.19 kB
TypeScript
import { Image } from '../Image.js';
import type { Mask } from '../Mask.js';
import type { ImageColorModel } from '../utils/constants/colorModels.js';
export interface ConvertColorOptions {
/**
* Image to which to output.
*/
out?: Image;
}
/**
* Convert image to a different color model.
* @param image - Image to convert.
* @param colorModel - New color model.
* @param options - Convert color options.
* @returns The converted image.
*/
export declare function convertColor(image: Image | Mask, colorModel: ImageColorModel, options?: ConvertColorOptions): Image;
/**
* Copy alpha channel of source to dest.
* @param source - Source image.
* @param dest - Destination image.
*/
export declare function copyAlpha(source: Image, dest: Image): void;
/**
* Convert Mask to GREY.
* @param mask - Mask to convert.
* @param newImage - Converted image.
*/
export declare function convertBinaryToGrey(mask: Mask, newImage: Image): void;
/**
* Convert mask to RGB or RGBA.
* @param mask - Mask to convert.
* @param newImage - Converted image.
*/
export declare function convertBinaryToRgb(mask: Mask, newImage: Image): void;
//# sourceMappingURL=convertColor.d.ts.map