Socket
Book a DemoInstallSign in
Socket

png-unique-colors

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

png-unique-colors

``` const pngUniqueColors = require('png-unique-colors') const colors = await pngUniqueColors('path/to/image.png') // buffer also available // 79766 ```

latest
npmnpm
Version
1.0.2
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

JavaScript module to count unique colors of PNG image.

Usage

const pngUniqueColors = require('png-unique-colors')
const colors = await pngUniqueColors('path/to/image.png') // buffer also available
// 79766

It is same as ImageMagick identify command output.

identify -verbose -unique path/to/image.png | grep Colors:
# Colors: 79766

FAQs

Package last updated on 10 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts