lwim
Light Weight Image Manipulation for NodeJS. It is forked from mono-bitmap
Installation
$ npm install --save lwim
Features
- Creating bitmaps (1, 2 or 4 bytes per pixel, in big- or little-endian)
- Changing the color depth
- Reading 8-bit .bmp files
- Saving .bmp files
- Getting/setting pixels
- Change the color of every pixel in a specific color
- Drawing rectangles (horizontal gradient in greyscale possible)
- Drawing circles/ellipses
- Inverting the bitmap
- Drawing a bitmap or a portion of it on a bitmap
- Drawing text with a bitmap font
Example
"use strict"; var lwim = ; // Create bitmapvar bitmap = lwim; // Draw rectangle with borderbitmap;bitmap; // Draw another bitmap with some source pixels in a specific color handled as transparentvar overlayBitmap = lwimbitmap;bitmap; // Draw textvar font = "P:\\ath\\to\\Font.json";font;bitmap; // The raw pixel data can also be processed in a user-specific wayvar data = bitmapdata; // Return a Node.js Buffer
Documentation
The documentation can be generated from the source code by:
[jsdoc](http://usejsdoc.org/) index.js
License
MIT © taoyuan