pixelated

1.0.1 • Public • Published

pixelated

A tool for pixelating images

Terminal Usage

Install pixelated globally on your machine

npm install -g pixelated

Convert a pixelated image, defaults output to in_pixelated.png

pixelated in.png

Optionally supply output file

pixelated in.png out.png

Optionally specify the pixel size, defaults to 20x20 pixels

pixelated in.png -p 50
pixelated in.png --pixel 50
pixelated in.png -p 50x50
pixelated in.png --pixel 50x50

You can even specify a nonsquare pixel size, width x height

pixelated in.png -p 10x50
pixelated in.png --pixel 10x50

View the usage guide in terminal

pixelated help

Module Usage

Install pixelated as a dependency

npm install -s pixelated

Import and use

const pixelated = require('pixelated')
 
const promise = pixelated({
  input: 'in.png',
  output: 'out.png', // defaults to 'in_pixelated.png'
  pixel: 50, // defaults to 20
  greyscale: true //defaults to false
})

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

Package Sidebar

Install

npm i pixelated

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

6.53 kB

Total Files

12

Last publish

Collaborators

  • jayrdeaton