New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

picha

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

picha - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

15

lib/image.js

@@ -20,3 +20,3 @@

this.data = new Buffer(this.stride * this.height);
if (this.stride * this.height != 0 && this.data.length < this.stride * this.height)
if (this.data && this.data.length < this.stride * (this.height - 1) + this.width * psize)
throw new Error("image data too small");

@@ -62,1 +62,14 @@ }

}
Image.prototype.subView = function(x, y, w, h) {
var p = this.pixelSize();
var off = y * this.stride + x * p;
var len = (h - 1) * this.stride + w * p;
return new Image({
width: w,
height: h,
pixel: this.pixel,
stride: this.stride,
data: this.data.slice(off, off + len)
});
}

2

package.json
{
"name": "picha",
"version": "0.1.0",
"version": "0.2.0",
"description": "image format codec and simple image processing",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc