New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rgbquant

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rgbquant - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

demo/img/alpha.png

3

HISTORY.md

@@ -16,2 +16,5 @@ History

#### 1.1.2 _(2015-08-10)_
- Remove some unused files
#### 1.1.1 _(2015-02-04)_

@@ -18,0 +21,0 @@ - Adds the slightly faster but less accurate Manhatten color distance as option

2

package.json

@@ -6,3 +6,3 @@ {

"author": "Leon Sorokin <leeoniya@gmail.com>",
"version": "1.1.1",
"version": "1.1.2",
"main": "src/rgbquant.js",

@@ -9,0 +9,0 @@ "repository": {

@@ -58,3 +58,31 @@ RgbQuant.js

```
### Node.js
npm package: https://www.npmjs.com/package/rgbquant
example with https://www.npmjs.com/package/canvas
```js
var fs = require('fs'),
Canvas = require('canvas'),
Image = Canvas.Image,
RgbQuant = require('rgbquant');
var imgPath = "./test.png",
img, can, ctx, q, pal, out;
fs.readFile(imgPath, function(err, data) {
img = new Image;
img.src = data;
can = new Canvas(img.width, img.height);
ctx = can.getContext('2d');
ctx.drawImage(img, 0, 0, img.width, img.height);
q = new RgbQuant();
q.sample(can);
pal = q.palette(true);
out = q.reduce(can);
});
```
---

@@ -61,0 +89,0 @@ ### Docs

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc