UNPKG

askui

Version:

Reliable, automated end-to-end-testing that depends on what is shown on your screen instead of the technology you are running on

19 lines (18 loc) 798 B
import type sharp from 'sharp'; export declare class Base64Image { private buffer; static readonly strPrefix = "data:image/png;base64,"; private _sharp?; private constructor(); static fromPathOrString(pathOrStr: string): Promise<Base64Image>; static fromPath(filePath: string): Promise<Base64Image>; static fromString(str: string): Promise<Base64Image>; private static fromBuffer; private getSharp; getInfo(): Promise<sharp.OutputInfo>; resizeToFitInto(dimension: number): Promise<Base64Image>; resizeWithSameAspectRatio(width: number, height: number): Promise<Base64Image>; cropRegion(x: number, y: number, croppedWidth: number, croppedHeight: number): Promise<Base64Image>; toString(withPrefix?: boolean): string; toBuffer(): Buffer; }