https://github.com/ruffrey/pnger
lossy png compression and optimization for node, with no deps on linux, win, mac
https://github.com/ruffrey/pnger
Last synced: over 1 year ago
JSON representation
lossy png compression and optimization for node, with no deps on linux, win, mac
- Host: GitHub
- URL: https://github.com/ruffrey/pnger
- Owner: ruffrey
- Created: 2014-08-17T15:27:11.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2016-04-05T02:34:30.000Z (about 10 years ago)
- Last Synced: 2025-02-08T22:34:10.937Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 1.09 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pgner
[](http://badge.fury.io/js/pnger)
PNG compression and optimization for Node.js, from a base64 buffer, on windows, linux, mac.
## Installing
npm install pnger
## Usage
```javascript
var pnger = require('pnger');
var saveFilePath = __dirname + '/myfile.png';
var options = {
// required
buffer: myBase64Utf8PngBuffer,
output: saveFilePath,
// optional
quality: '60-80', // '0-100'
speed: '5', // between 0 and 10
optimize: '3', // between 1 and 7
uid: 0
};
pnger(options, function (err) {
if (err) {
console.error(err);
}
// your file is saved at saveFilePath
});
```
## Options
See [source jsdoc on settings](https://github.com/ruffrey/pnger/blob/master/index.js).
## nodewebkit support
Tested cross platform on nodewebkit.
## Build platform
pnger builds on any platform, runs on any platform. So it can be prebuilt on your mac and deployed elsewhere.
## License
All included software is copyrighted and protected by the respective developers.
This project is licensed under the **MIT license**, copyright (c) Jeff Parrish:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.