npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

bare-image-resample

1.0.2

@kasperisager

npmHomeRepoSnykSocket
Downloads:3592
$ npm install bare-image-resample
DailyWeeklyMonthlyYearly

bare-image-resample

Image resampling support for Bare.

npm i bare-image-resample

Usage

const jpeg = require('bare-jpeg')
const { resize } = require('bare-image-resample')

const image = require('./my-image.jpg', { with: { type: 'binary' } })

const decoded = jpeg.decode(image)
// {
//   width: 200,
//   height: 400,
//   data: <Buffer>
// }

const resized = resize(decoded, 100, 200)
// {
//   width: 100,
//   height: 200,
//   data: <Buffer>
// }

License

Apache-2.0