Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/semanser/png-pixel
- Owner: semanser
- Created: 2016-07-06T16:14:15.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-10-12T11:53:22.000Z (about 6 years ago)
- Last Synced: 2024-10-22T15:40:52.376Z (29 days ago)
- Topics: array, pixel, png, png-image-generate, png-pixel
- Language: JavaScript
- Homepage:
- Size: 30.3 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![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.