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

node-js-image

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-js-image - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

package.json
{
"name": "node-js-image",
"version": "0.0.1",
"version": "0.0.2",
"description": "Manipulate Images in Node.js",

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

const fs = require('fs')
const jpeg = require('jpeg-js')
/** @typedef { number[] } Array1D One Dimensional Array */
/** @typedef { number[][] } Array2D Two Dimensional Array */
/** @typedef { number[][][] } Array3D Three Dimensional Array */
/** @typedef { number[] } Array1D One Dimensional Array */
/** @typedef { number[][] } Array2D Two Dimensional Array */
/** @typedef { number[][][] } Array3D Three Dimensional Array */

@@ -94,4 +94,3 @@ /**

fromBuffer (buffer) {
const decoded = this.decode(buffer, { useTArray: true })
const { data, width, height } = decoded
const { data, width, height } = this.decode(buffer, { useTArray: true })
this.data = Array.from(data)

@@ -228,5 +227,7 @@ this.width = width

pixels () {
if(!this.isFlat) { this.flatten() }
if (!this.isFlat) {
return this
}
const [width, height, slice] = [this.width, this.height, this.channels]
const [width, height, slice] = this.shape
const n = this.data.length

@@ -233,0 +234,0 @@

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