UNPKG

illustrator.js

Version:

JavaScript image processing library

30 lines (29 loc) 1.2 kB
/// <reference types="node" /> import { Transformer, Orientation, AvifConfig, ChromaSubsampling, CompressionType, JsColorType, FilterType, ResizeFilterType, Metadata } from "@napi-rs/image"; import { ImageData } from "@napi-rs/canvas"; export { AvifConfig, Metadata }; export declare type IllustratorImageData = ImageData & { colorSpace: PredefinedColorSpace; }; export declare const IllustratorImageEnums: { Orientation: typeof Orientation; ChromaSubsampling: typeof ChromaSubsampling; CompressionType: typeof CompressionType; JsColorType: typeof JsColorType; FilterType: typeof FilterType; ResizeFilterType: typeof ResizeFilterType; }; export interface RawImageData { data: Uint8ClampedArray | Buffer; width: number; height: number; } export declare class IllustratorImage extends Transformer { private readonly _data; constructor(_data: Buffer); get source(): Buffer; toImage(): Promise<import("@napi-rs/canvas").Image>; toImageSync(): import("@napi-rs/canvas").Image; static fromImageData(data: ImageData | RawImageData): Promise<IllustratorImage>; static fromImageDataSync(data: ImageData | RawImageData): IllustratorImage; }