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
17 lines (16 loc) • 669 B
TypeScript
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>;
toString(withPrefix?: boolean): string;
}