Gathering detailed insights and metrics for image-q
Gathering detailed insights and metrics for image-q
Gathering detailed insights and metrics for image-q
Gathering detailed insights and metrics for image-q
q-view
[Preview](https://q-hub-q-view.vercel.app/)
@qneyraud/q-image
Vue component for images using picture tag, srcset and lazyload
qimage
Simple Promise Image Loader based on Q
altrone-ui
<p align='center'> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://altrone.vercel.app/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Faltrone-dark.38721ddd.png&w=750&q=75"> <img width='240' height='48' src="https://altro
Image Quantization Library with alpha support (based on https://github.com/leeoniya/RgbQuant.js, https://github.com/timoxley/neuquant and http://www.ece.mcmaster.ca/~xwu/cq.c)
npm install image-q
Typescript
Module System
Node Version
NPM Version
99.8
Supply Chain
100
Quality
76
Maintenance
100
Vulnerability
99.6
License
TypeScript (98.62%)
JavaScript (1.38%)
Total Downloads
200,637,810
Last Day
177,220
Last Week
1,167,940
Last Month
4,844,520
Last Year
51,285,586
151 Stars
167 Commits
11 Forks
4 Watchers
885 Branches
2 Contributors
Updated on Mar 24, 2025
Minified
Minified + Gzipped
Latest Version
4.0.0
Package Id
image-q@4.0.0
Unpacked Size
825.63 kB
Size
164.04 kB
File Count
140
NPM Version
6.14.15
Node Version
14.18.2
Cumulative downloads
Total Downloads
1
4
Complete Image Quantization Library in TypeScript (MIT License)
Image Color Number Reduction with alpha support using RGBQuant/NeuQuant/Xiaolin Wu's algorithms and Euclidean/Manhattan/CIEDE2000 color distance formulas in TypeScript
Platforms supported
API
Builds
dist/cjs/image-q.js
- CommonJSdist/esm/image-q.js
- ESM (ESNext)dist/cjs/image-q.js
- UMDImport
HTMLImageElement
HTMLCanvasElement
NodeCanvas
ImageData
Array
CanvasPixelArray
Uint8Array
Uint32Array
Color Distance
Euclidean
- 1/1/1/1 coefficients (originally used in Xiaolin Wu's Quantizer WuQuant)EuclideanBT709NoAlpha
- BT.709 sRGB coefficients (originally used in RGBQuant)EuclideanBT709
BT.709 sRGB coefficients + alpha supportManhattan
- 1/1/1/1 coefficients (originally used in NeuQuant)ManhattanBT709
- BT.709 sRGB coefficientsManhattanNommyde
- see https://github.com/igor-bezkrovny/image-quantization/issues/4#issuecomment-234527620CIEDE2000
- CIEDE2000 (very slow)CIE94Textiles
- CIE94 implementation for textilesCIE94GraphicArts
- CIE94 implementation for graphic artsCMetric
- see http://www.compuphase.com/cmetric.htmPNGQuant
- used in pngQuant toolPalette Quantizers
NeuQuant
(original code ported, integer calculations)NeuQuantFloat
(floating-point calculations)RGBQuant
WuQuant
Image Quantizers
NearestColor
ErrorDiffusionArray
- two modes of error propagation are supported: xnview
and gimp
FloydSteinberg
FalseFloydSteinberg
Stucki
Atkinson
Jarvis
Burkes
Sierra
TwoSierra
SierraLite
ErrorDiffusionRiemersma
- Hilbert space-filling curve is usedOutput
Uint32Array
Uint8Array
image-q
library into your project1// will import ESM (ESNext) or UMD version depending on your bundler/node 2import * as iq from 'image-q';
1var iq = require('image-q');
1<script 2 src="<path-to image-q/dist/umd/image-q.js>" 3 type="text/javascript" 4 charset="utf-8" 5></script>
Please refer to API Documentation and Usage
+ PaletteQuantizer#quantize => PaletteQuantizer#quantizeSync
+ ImageQuantizer#quantize => ImageQuantizer#quantizeSync
+ EuclideanRgbQuantWOAlpha => EuclideanBT709NoAlpha
+ EuclideanRgbQuantWithAlpha => EuclideanBT709
+ ManhattanSRGB => ManhattanBT709
+ IImageDitherer => AbstractImageQuantizer
+ IPaletteQuantizer => AbstractPaletteQuantizer
+ PointContainer.fromNodeCanvas => PointContainer.fromHTMLCanvasElement
+ PointContainer.fromArray => PointContainer.fromUint8Array
+ PointContainer.fromBuffer (Node.js, new)
+ CMETRIC => CMetric
+ PNGQUANT => PNGQuant
+ SSIM Class => ssim function
+ Test cases for different types of imports and requres added
+ Try to solve exported bundle types problem. 'umd' bundle removed.
+ Test case for issue #95 added
+ Fixes #96: Fix minimumColorDistanceToDither (PR #97 by @pixelplanetdev)
+ Fixes #95: "Always empty result in certain webpack / babel configs" (PR #98)
+ Fixes issue "Module not found: Can't resolve 'core-js/fn/set-immediate' in ..."
+ pnpm monorepo, esbuild for faster builds, typescript upgraded
+ Basic (Simple) API implemented
+ see breaking changes
+ @types/node moved to 'dependencies'
+ documentation added
+ some refactorings/renames, see breaking changes
+ circular dependency removed
+ readme updated
+ progress tracking api (using es6 generators) added
+ strinct lint rules (+code cleanup/renames)
+ rollup (3 different versions - umd, cjs, esm + source maps + d.ts)
+ latest TypeScript
+ jest
+ snapshot tests
+ coverage (+coveralls)
+ greenkeeper
+ CIEDE2000 - incorrect calculation fixed
+ CIEDE2000 - alpha channel now has only 25% impact on color distance instead of 66%
+ CIE94 - added 2 types (textiles and graphics art) according to spec
+ CIE94 - alpha support added
+ rgb2xyz, lab2xyz, xyz2rgb, xyz2lab - gamma correction
+ lab2xyz, xyz2lab - refY should be 100 (1.00000) instead of 10 (0.10000)
+ manhattan with new (Nommyde) coefficients added
+ mocha tests added
+ webpack integration
+ image-q is now UMD module
+ travis-ci integration
+ typescript 2.0
+ indentation with 4 spaces
+ Refactoring
+ Riemersma dithering added (Hilbert Curve)
+ Readme.md updated
+ build.cmd updated
+ NeuQuant is fixed (again) according to original Anthony Dekker source code (all values should be integer)
+ Error Diffusion Dithering is now calculates error like XNVIEW
+ Refactoring
+ Documentation generation fixed
+ File name case problem fixed
+ Auto-generated documentation added
+ Refactoring
+ Code cleanup, removed unnecessary files
+ PNGQuant color distance added, need to check its quality
+ CIEDE2000 and CIE94 fixed for use in NeuQuant
+ NeuQuant is fixed according to original Anthony Dekker source code (all values should be integer)
+ Code refactoring and cleanup
* We have some slowdown because of red/green/blue/alpha normalization according to white point per each calculateRaw/calculateNormalized call
+ CIEDE2000 color distance equation optimized (original CIEDE2000 equation is available as class `CIEDE2000_Original`)
+ CMetric color distance fixed
+ Cleanup
+ Draft of CMetric color distance added
+ rgb2xyz & xyz2lab fixed. CIEDE2000 works much better now.
+ CIE94 distance formula added. More investigation is needed.
+ Initial
Thanks to Leon Sorokin for information share and his original RGBQuant!
Palette Quantization Algorithms
JavaScript
TypeScript
JavaScript
JavaScript
C
C
C#
C#
GPLv3
Image Quantization Algorithms
Color Distance Formulas
DRAFT!
Color conversion formulas
Be sure to fix rgb2xyz/xyz2lab. Issue is with strange part of code:
r = r > 0.04045 ? ...
. Check http://en.wikipedia.org/wiki/Lab_color_space
Image Quality Assessment
Java
License: MIT
Other
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
SAST tool detected but not run on all commits
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
41 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-03-24
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreLast Day
-11.4%
177,220
Compared to previous day
Last Week
0%
1,167,940
Compared to previous week
Last Month
7.1%
4,844,520
Compared to previous month
Last Year
15.9%
51,285,586
Compared to previous year