All Projects → IjzerenHein → pnglib-es6

IjzerenHein / pnglib-es6

Licence: other
Create png images in pure javascript (modern & fast ES6 version using typed Arrays)

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to pnglib-es6

png pong
A pure Rust PNG image decoder and encoder based on lodepng.
Stars: ✭ 21 (-48.78%)
Mutual labels:  png, png-encoder
nimPNG
PNG (Portable Network Graphics) decoder and encoder written in Nim
Stars: ✭ 81 (+97.56%)
Mutual labels:  png, png-encoder
VBA-Better-Array
An array class for VBA providing features found in more modern languages
Stars: ✭ 77 (+87.8%)
Mutual labels:  modern
Emoji-Tools
Multiple useful tools to help Android and iOS/OSX developers with creating and modifying Emoji Font files.
Stars: ✭ 102 (+148.78%)
Mutual labels:  png
flag-icons
A beautiful svg + png + sass + css collection of 261 flags.
Stars: ✭ 61 (+48.78%)
Mutual labels:  png
sail
The missing small and fast image decoding library for humans (not for machines) ⛵ https://sail.software
Stars: ✭ 206 (+402.44%)
Mutual labels:  png
png
🖼A full-featured PNG decoder and encoder.
Stars: ✭ 64 (+56.1%)
Mutual labels:  png
htr-united
Ground Truth Resources for the HTR of patrimonial documents
Stars: ✭ 23 (-43.9%)
Mutual labels:  modern
ee.Screen
Takes screenshots of web pages for the list of URLs. Various resolutions, multiple formats (JPG, PDF, PNG and TXT)
Stars: ✭ 19 (-53.66%)
Mutual labels:  png
jimp-compact
✏️ Lightweight version of Jimp -- An image processing library written entirely in JavaScript for Node.js
Stars: ✭ 55 (+34.15%)
Mutual labels:  png
cli-template
⚗ The most advanced CLI template on earth! Featuring automatic releases, website generation and a custom CI-System out of the box.
Stars: ✭ 43 (+4.88%)
Mutual labels:  modern
pixl
🚀 Lightweight image processing library in C++11
Stars: ✭ 31 (-24.39%)
Mutual labels:  png
stumpy png
Read/Write PNG images in pure Crystal
Stars: ✭ 99 (+141.46%)
Mutual labels:  png
InMangaKindle
Descarga manga en español en diferentes formatos (PNG, PDF, EPUB, MOBI)
Stars: ✭ 43 (+4.88%)
Mutual labels:  png
MakeNotes
📝 Made a Note App . User can make important notes 📑as well as save it for future 📆 reference. You can mark important✔️ as well as non important which makes it very easy to distinguish between different notes📰. (Html,Bootstrap,CSS,Javascript)
Stars: ✭ 18 (-56.1%)
Mutual labels:  png
documentspark
💖 DocumentSpark - Simple secure document viewing server. Converts a document to a picture of its pages. Content disarm and reconstruction. CDR. Formerly p2. The CDR solution for ViewFinder remote browser.
Stars: ✭ 211 (+414.63%)
Mutual labels:  png
saveddit
Bulk Downloader for Reddit
Stars: ✭ 130 (+217.07%)
Mutual labels:  png
cforum
https://github.com/ckruse/cforum_ex/
Stars: ✭ 22 (-46.34%)
Mutual labels:  modern
cookiecutter-modern-pypackage
Cookiecutter template for a modern Python package.
Stars: ✭ 97 (+136.59%)
Mutual labels:  modern
wa-sticker-formatter
Sticker Creator for WhatsApp
Stars: ✭ 60 (+46.34%)
Mutual labels:  png

pnglib-es6

Modern & fast version of the original javascript pnglib library.

This version uses typed-arrays and is roughly 3-4 x as fast as the original library.

View Demo Here

Install

npm install pnglib-es6

Usage

import PNGImage from 'pnglib-es6';

// Create new PNG image, parameters (only indexed 8-bit pngs are supported at the moment):
// width (number)
// height (number)
// depth (number of palette entries)
// [backgroundColor] (optional background color, when omitted 'transparent' is used)
const image = new PNGImage(100, 100, 8);

// Add colors to the palette (uses tinycolor for converting the color)
const redColor = image.createColor('#FF0000');
const blueColor = image.createColor('blue');
const greenColor = image.createColor('rgba(0, 255, 0, 1)');

// Do some pixel drawing
image.setPixel(50, 50, redColor);
const color = image.getPixel(50, 50);
...

// Convert image to base-64
const base64 = image.getBase64();

// Or get the data-url which can be passed directly to an <img src>
const dataUri = image.getDataURL(); // data:image/png;base64,...
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].