Socket
Socket
Sign inDemoInstall

imagemin-upng

Package Overview
Dependencies
3
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.3 to 1.0.4

11

index.js

@@ -7,3 +7,3 @@ 'use strict';

module.exports = function(opts) {
opts = opts || {};
opts = Object.assign({cnum: 256}, opts);

@@ -19,11 +19,6 @@ return function(buf) {

var cnum = opts.cnum;
if (isNaN(cnum)) {
cnum = 256;
}
var oriImg = upng.decode(buf);
var oriRGBA = upng.toRGBA8(oriImg).buffer;
var comArrayBuff = upng.encode(oriRGBA, oriImg.width, oriImg.height, cnum);
var comArrayBuff = upng.encode(oriRGBA, oriImg.width, oriImg.height, opts.cnum);
var comBuffer = Buffer.from(comArrayBuff)

@@ -33,2 +28,2 @@

};
};
};
{
"name": "imagemin-upng",
"version": "1.0.3",
"version": "1.0.4",
"description": "upng imagemin plugin",

@@ -5,0 +5,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc