Skip to content

Commit

Permalink
polish 1.1.0, add HISTORY.md, poke #9
Browse files Browse the repository at this point in the history
  • Loading branch information
leeoniya committed Feb 3, 2015
1 parent 622b8dc commit 21c9a14
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 3 deletions.
25 changes: 25 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
History
-------

### 2.0.0 ????-??-??
- Transparency quant support (like pornel/pngquant, png8)

### 1.2.0 2015-??-??
- Ordered dithering (#10) kernels:, wiki:
- Half-toning?
- Fix transparent bg when dithering (#7)
- ~~CIEDE2000 color-diff option~~ sooooo sloooow (see ciede2000 branch)

### 1.1.0 (2015-02-03)
- Caching options and perf improvements

### 1.0.0 (2015-01-27)
- Any size output palette
- Multi-image, optimal palettes
- Predefined, reducible palettes
- Palette sorting by hue/sat/lum
- Various input formats: <img>,<canvas>,ImageData,pixel-array
- Indexed or Uint8Array image reduction
- Error-diffusion dithering (multi-kernel)
- Dithering strength option
- Browser, CommonJS, Node, component.io support
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ var opts = {
dithSerp: false, // enable serpentine pattern dithering
palette: [], // a predefined palette to start with in r,g,b tuple format: [[r,g,b],[r,g,b]...]
reIndex: false, // affects predefined palettes only. if true, allows compacting of sparsed palette once target palette size is reached. also enables palette sorting.
useCache: true, // enables caching for perf usually, but can reduce perf in some cases, like pre-def palettes
cacheFreq: 10, // min color occurance count needed to qualify for caching
};

var q = new RgbQuant(opts);
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rgbquant",
"repository": "leeoniya/RgbQuant.js",
"version": "1.0.0",
"version": "1.1.0",
"dependencies": {
},
"main": "src/rgbquant.js",
Expand Down
1 change: 1 addition & 0 deletions demo/fixedpalette.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
reIndex: true,
dithKern: "FloydSteinberg",
dithDelta: 0.05,
useCache: false,
});

var rgb6bit32 = [];
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "color quantization lib",
"homepage": "http://o-0.me/RgbQuant/",
"author": "Leon Sorokin <[email protected]>",
"version": "1.0.0",
"version": "1.1.0",
"main": "src/rgbquant.js",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/rgbquant.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
this.i32rgb = {};
// enable color caching (also incurs overhead of cache misses and cache building)
this.useCache = opts.useCache !== false;
// max number of color-mappings to cache
// min color occurance count needed to qualify for caching
this.cacheFreq = opts.cacheFreq || 10;
// allows pre-defined palettes to be re-indexed (enabling palette compacting and sorting)
this.reIndex = opts.reIndex || this.idxrgb.length == 0;
Expand Down

0 comments on commit 21c9a14

Please sign in to comment.