Socket
Socket
Sign inDemoInstall

jpeg-js

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jpeg-js - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

test/fixtures/unconventional-table.jpg

11

lib/decoder.js

@@ -697,3 +697,3 @@ /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /

v: v,
quantizationTable: quantizationTables[qId]
quantizationIdx: qId
};

@@ -765,2 +765,11 @@ offset += 3;

// set each frame's components quantization table
for (var i = 0; i < frames.length; i++) {
var cp = frames[i].components;
for (var j in cp) {
cp[j].quantizationTable = quantizationTables[cp[j].quantizationIdx];
delete cp[j].quantizationIdx;
}
}
this.width = frame.samplesPerLine;

@@ -767,0 +776,0 @@ this.height = frame.scanLines;

2

package.json
{
"name": "jpeg-js",
"version": "0.1.0",
"version": "0.1.1",
"description": "A pure javascript JPEG encoder and decoder",

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

@@ -51,2 +51,9 @@ var redtape = require('redtape'),

it('should be able to decode a unconventional table JPEG', function (t) {
var jpegData = fixture('unconventional-table.jpg');
var rawImageData = jpeg.decode(jpegData);
t.equal(rawImageData.width, 1920);
t.equal(rawImageData.height, 1200);
t.end();
});

@@ -90,1 +97,2 @@ it('should be able to encode a JPEG', function (t) {

});
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