1.2.1 • Published 2 years ago
quickimageresizer v1.2.1
QuickImageResizer
A fast and efficient image resizer for the web, leveraging modern libraries to provide high-quality image resizing with additional features like cropping and rotation.
Features
- High-quality image resizing with Pica.
- Supports reading and correcting orientation from EXIF data.
- Crop functionality with an interactive UI using CropperJS.
- Save resized images directly from the browser using FileSaver.
Usage
import QuickImageResizer from 'quickimageresizer';
const file = document.getElementById('input-file').files[0];
const resizer = new QuickImageResizer(file);
resizer.processImage(1024, 768, { aspectRatio: 16 / 9 }).then(() => {
console.log('Image processed and saved.');
});Ensure you have an input element of type file with id="input-file" for this example to work.
Dependencies
picafor resizingblueimp-load-imagefor loading and EXIF orientationfile-saverfor saving filesexif-jsfor EXIF data manipulationcropperjsfor cropping functionality