pixxle
v1.0.4
Published
An npm package for image compression using Sharp.
Readme
Pixxle
An npm package for image compression .
Installation
You can install the Pixxle package via npm:
npm install pixxleUsage
In your JavaScript code, require the compressImage function from the package and use it to compress images.
const pixxle = require('pixxle');
// Example usage
const compressedImage = pixxle.compressImage('input.jpg', 'output.jpg', { width: 800, height: 600 });Parameters
inputPath: The path to the input image file.outputPath: The path where the compressed image will be saved.options: An optional object specifying the width and height of the compressed image. If not provided, the image will be compressed to its original dimensions.
Example
const compressedImage = pixxle.compressImage('input.jpg', 'output.jpg', { width: 800, height: 600 });License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Special thanks to the developers of the Sharp library for providing powerful image processing capabilities.
