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
11 lines (10 loc) • 428 B
TypeScript
/**
* @name converBase64ToImage
* @description Takes a base64 string that begins with data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD// and converts it to an image.
* @param {string} base64 Buffer to be converted to image.
* @param {string} path Full path to write image to e.g /path/to/image.png
* @requires fs
*
* @returns {void}
*/
export declare const converBase64ToImage: (base64: string, path: string) => void;