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

@react-pdf/image

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-pdf/image - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

11

lib/index.browser.js

@@ -5,2 +5,3 @@ import _regeneratorRuntime from '@babel/runtime/helpers/regeneratorRuntime';

import PNG from '@react-pdf/png-js';
import exif from 'jpeg-exif';

@@ -1987,4 +1988,2 @@ var global$1 = (typeof global !== "undefined" ? global :

// Extracted from https://github.com/devongovett/pdfkit/blob/master/lib/image/jpeg.coffee
var MARKERS = [0xffc0, 0xffc1, 0xffc2, 0xffc3, 0xffc5, 0xffc6, 0xffc7, 0xffc8, 0xffc9, 0xffca, 0xffcb, 0xffcc, 0xffcd, 0xffce, 0xffcf];

@@ -2001,2 +2000,5 @@ var JPEG = function JPEG(data) {

var pos = 2;
// Parse the EXIF orientation
this.orientation = exif.fromBuffer(this.data).Orientation || 1;
while (pos < data.length) {

@@ -2017,2 +2019,7 @@ marker = data.readUInt16BE(pos);

this.width = data.readUInt16BE(pos);
if (this.orientation > 4) {
var _ref = [this.height, this.width];
this.width = _ref[0];
this.height = _ref[1];
}
};

@@ -2019,0 +2026,0 @@ JPEG.isValid = function (data) {

@@ -8,2 +8,3 @@ import _regeneratorRuntime from '@babel/runtime/helpers/regeneratorRuntime';

import PNG from '@react-pdf/png-js';
import exif from 'jpeg-exif';

@@ -18,4 +19,2 @@ PNG.isValid = function isValid(data) {

// Extracted from https://github.com/devongovett/pdfkit/blob/master/lib/image/jpeg.coffee
var MARKERS = [0xffc0, 0xffc1, 0xffc2, 0xffc3, 0xffc5, 0xffc6, 0xffc7, 0xffc8, 0xffc9, 0xffca, 0xffcb, 0xffcc, 0xffcd, 0xffce, 0xffcf];

@@ -32,2 +31,5 @@ var JPEG = function JPEG(data) {

var pos = 2;
// Parse the EXIF orientation
this.orientation = exif.fromBuffer(this.data).Orientation || 1;
while (pos < data.length) {

@@ -48,2 +50,7 @@ marker = data.readUInt16BE(pos);

this.width = data.readUInt16BE(pos);
if (this.orientation > 4) {
var _ref = [this.height, this.width];
this.width = _ref[0];
this.height = _ref[1];
}
};

@@ -50,0 +57,0 @@ JPEG.isValid = function (data) {

5

package.json
{
"name": "@react-pdf/image",
"version": "2.3.0",
"version": "2.3.1",
"license": "MIT",

@@ -35,3 +35,4 @@ "description": "Parses the images in png or jpeg format for react-pdf document",

"@react-pdf/png-js": "^2.3.0",
"cross-fetch": "^3.1.5"
"cross-fetch": "^3.1.5",
"jpeg-exif": "^1.1.4"
},

@@ -38,0 +39,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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