UNPKG

convert-base64-to-image

Version:

This is a node package that helps you to convert base64 string created by javascript file reader to image downloadable file

13 lines (12 loc) 551 B
/// <reference types="node" /> export declare const readBase64File: (base64: string) => string; export declare const convertBase64ToBuffer: (base64: string) => Buffer; /** * @name bufferToImageAndWriteImageToPath * @description Takes a buffer and converts it to image and writes image to path. * @param {Buffer} buffer Buffer to be converted to image. * @param {string} path Full path to write image to e.g /path/to/image.png * * @returns {void} */ export declare const bufferToImageAndWriteImageToPath: (buffer: Buffer, path: string) => void;