quickimageresizer
v1.2.1
Published
A fast and efficient image resizer for the web.
Downloads
4
Maintainers
Readme
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
pica
for resizingblueimp-load-image
for loading and EXIF orientationfile-saver
for saving filesexif-js
for EXIF data manipulationcropperjs
for cropping functionality