Closed nymlc closed 1 month ago
export class Image {
readonly width: number
readonly height: number
cropSync(x: number, y: number, width: number, height: number): Image
crop(x: number, y: number, width: number, height: number): Promise<Image>
toPngSync(copyOutputData?: boolean | undefined | null): Buffer
toPng(copyOutputData?: boolean | undefined | null): Promise<Buffer>
toJpegSync(copyOutputData?: boolean | undefined | null): Buffer
toJpeg(copyOutputData?: boolean | undefined | null): Promise<Buffer>
toBmpSync(copyOutputData?: boolean | undefined | null): Buffer
toBmp(copyOutputData?: boolean | undefined | null): Promise<Buffer>
toRawSync(copyOutputData?: boolean | undefined | null): Buffer
toRaw(copyOutputData?: boolean | undefined | null): Promise<Buffer>
}
在electron 里面 copyOutputData 传true