image-helpers
Install
To install, run:
npm install @indexsoftware/image-helpers
Usage
To use the image-helpers:
import ImageHelpers from '@indexsoftware/image-helpers'
const ih = new ImageHelpers();
ih.maxWidth = 1024;
ih.maxHeight = 900;
// Load the image
ih.load(files[0]);
// Get the image base64
console.log(ih.imageDataUrl);
// Get the image base64 size
console.log(ih.imageDataUrlSize);
// Get the image blob
console.log(ih.imageObjectUrl);
// Get the original file
console.log(ih.file);