1.2.1 • Published 2 months ago

quickimageresizer v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

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 resizing
  • blueimp-load-image for loading and EXIF orientation
  • file-saver for saving files
  • exif-js for EXIF data manipulation
  • cropperjs for cropping functionality