@randy.tarampi/lwip
Advanced tools
Comparing version 0.0.14 to 0.0.15
@@ -0,1 +1,8 @@ | ||
## [0.0.15](https://github.com/randytarampi/lwip/compare/v0.0.14...v0.0.15) (2019-03-08) | ||
### Bug Fixes | ||
* `new Buffer` -> `Buffer.allocUnsafe`. ([9b4b113](https://github.com/randytarampi/lwip/commit/9b4b113)) | ||
## [0.0.14](https://github.com/randytarampi/lwip/compare/v0.0.13...v0.0.14) (2019-03-08) | ||
@@ -2,0 +9,0 @@ |
@@ -70,3 +70,3 @@ 'use strict'; | ||
c_len = width * height, | ||
pixelsBuf = new Buffer(c_len * 4); | ||
pixelsBuf = Buffer.allocUnsafe(c_len * 4); | ||
for (let i = 0; i < width * height; i++) { | ||
@@ -73,0 +73,0 @@ pixelsBuf[i] = color.r; |
@@ -146,3 +146,3 @@ 'use strict'; | ||
throw Error('Incorrect number of channels in original buffer'); | ||
const rgba = new Buffer(chanLen * 4); | ||
const rgba = Buffer.allocUnsafe(chanLen * 4); | ||
switch (channels){ | ||
@@ -149,0 +149,0 @@ case 1: |
{ | ||
"name": "@randy.tarampi/lwip", | ||
"description": "Comprehensive, fast, and simple image processing and manipulation", | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Randy Tarampi", |
@@ -80,11 +80,17 @@ # Light-weight image processor for NodeJS | ||
`npm install lwip` | ||
```bash | ||
npm install @randy.tarampi/lwip | ||
``` | ||
Or, clone this repo and `cd lwip && npm install`. | ||
Or, clone this repo and `cd @randy.tarampi/lwip && npm install`. | ||
You can run tests with `npm test`. | ||
**Note:** Installation of this module involves compiling native code. | ||
If `npm install lwip` failes, you probably need to setup your system. | ||
[See instructions](https://github.com/TooTallNate/node-gyp#installation). | ||
##### NOTE: Installation of this module involves compiling native code | ||
If `npm install @randy.tarampi/lwip` fails, you probably need to setup your system. | ||
See the [instructions for `node-gyp`](https://github.com/TooTallNate/node-gyp#installation). | ||
Building on non-Windows systems requires that you have `giflib`, `libjpeg` and `libpng` already installed and available. | ||
Building on Windows with Visual Studio requires version 2013 or higher. | ||
@@ -104,3 +110,3 @@ | ||
// obtain an image object: | ||
require('lwip').open('image.jpg', function(err, image){ | ||
require('@randy.tarampi/lwip').open('image.jpg', function(err, image){ | ||
@@ -125,3 +131,3 @@ // check err... | ||
```Javascript | ||
var lwip = require('lwip'); | ||
var lwip = require('@randy.tarampi/lwip'); | ||
@@ -270,3 +276,3 @@ // obtain an image object: | ||
```Javascript | ||
const lwip = require('lwip'); | ||
const lwip = require('@randy.tarampi/lwip'); | ||
lwip.open('path/to/image.jpg', function(err, image){ | ||
@@ -282,3 +288,3 @@ // check 'err'. use 'image'. | ||
const fs = require('fs'), | ||
lwip = require('lwip'); | ||
lwip = require('@randy.tarampi/lwip'); | ||
@@ -308,3 +314,3 @@ fs.readFile('path/to/image.png', function(err, buffer){ | ||
```Javascript | ||
const lwip = require('lwip'); | ||
const lwip = require('@randy.tarampi/lwip'); | ||
@@ -852,3 +858,3 @@ lwip.create(500, 500, 'yellow', function(err, image){ | ||
The native part of this module is compiled from source which uses the following: | ||
The native part of this module is compiled from source which uses either your natively installed libraries, or the bundled versions of the following: | ||
@@ -858,6 +864,6 @@ - Independent JPEG Group's free JPEG software: | ||
- [Readme](https://github.com/randytarampi/lwip/blob/master/src/lib/jpeg/README) | ||
- libpng: | ||
- `libpng`: | ||
- [Website](http://www.libpng.org/) | ||
- [Readme](https://github.com/randytarampi/lwip/blob/master/src/lib/png/README) | ||
- zlib: | ||
- `zlib`: | ||
- [Website](http://www.zlib.net/) | ||
@@ -868,4 +874,4 @@ - [Readme](https://github.com/randytarampi/lwip/blob/master/src/lib/zlib/README) | ||
- [Readme](https://github.com/randytarampi/lwip/blob/master/src/lib/cimg/README.txt) | ||
- giflib | ||
- `giflib` | ||
- [Website](http://giflib.sourceforge.net/) | ||
- [Readme](https://github.com/randytarampi/lwip/blob/master/src/lib/gif/README) |
6500888
869