Socket
Book a DemoInstallSign in
Socket

png-quality

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

png-quality

Calculates MSE/PSNR of two PNG images.

latest
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

Calculates MSE/PSNR about two PNG images.

Usage

const psnr = PngCompare.mse('path/to/first.png', 'path/to/second.png')
// == 0.25

const psnr = PngCompare.psnr('path/to/first.png', 'path/to/second.png')
// == 6.020599913279624

These almost same as MSE/PSNR by ImageMagick.

compare -colorspace RGB -metric MSE path/to/first.png path/to/second.png null:
# == 0.25

compare -colorspace RGB -metric PSNR path/to/first.png path/to/second.png null:
# == 6.0206

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