Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/semanser/png-pixel

🖌️ Draw pixels in PNG easily
https://github.com/semanser/png-pixel

array pixel png png-image-generate png-pixel

Last synced: 24 days ago
JSON representation

🖌️ Draw pixels in PNG easily

Awesome Lists containing this project

README

        

Logo

[![npm version](https://badge.fury.io/js/png-pixel.svg)](https://badge.fury.io/js/png-pixel)

## Installation
npm install png-pixel --save

## Usage
```js
const PNGPixel = require('png-pixel')

PNGPixel.add('input.png', 'output.png', [
{x: 14, y: 10, color: '#24B3E3'},
{x: 14, y: 11, color: '#E32437'},
{x: 2, y: 5, color: 'E4238E', opacity: 128} // opacity is a 0-255
]).then(() => console.log('PNG successfully written'))
```

> Note: Input file need to be already exist before adding pixels.