1.0.1 • Published 5 months ago

kaiz-upscale v1.0.1

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

kaiz-upscale

A simple Node.js package for upscaling images 2x.

Installation :

npm i kaiz-upscale

Usage for ImageUrl :

const kaiz = require('kaiz-upscale');

const imageUrl = 'https://example.com/image.jpg';
const outputPath = './upscaled-image.jpg';

kaiz.upscale(imageUrl, outputPath)
  .then(() => console.log('Upscaled successfully!'))
  .catch(err => console.error('Upscale failed.', err.message));

Usage for Binary :

const fs = require('fs');
const kaiz = require('kaiz-upscale');

const imageBinary = fs.readFileSync('./image.jpg');
const outputPath = './upscaled-image.jpg';

kaiz.upscale(imageBinary, outputPath)
  .then(() => console.log('Upscaled successfully!'))
  .catch(err => console.error('Upscale failed.', err.message));

Output Example :

{
    ./upscaled-image.jpg
}