@caoshouse/data-uri
Version:
Decodes/Encodes images to DATAURI
9 lines (8 loc) • 326 B
TypeScript
/// <reference types="node" />
export declare function decode(dataURI: string): {
imageType: string;
dataBase64: string;
dataBuffer: Buffer;
};
export declare function encode(data: string | Buffer, mediaType: string): string | null;
export declare function encodeFromFile(filePath: string): string | null;