@eris/exif
Advanced tools
Comparing version 0.4.2-alpha.15 to 0.4.2-alpha.16
@@ -112,2 +112,3 @@ "use strict"; | ||
while (marker !== END_OF_IMAGE && reader.hasNext()) { | ||
log(`read marker ${marker.toString(16)}`); | ||
if (marker === START_OF_SCAN) { | ||
@@ -114,0 +115,0 @@ // If we reached the scan data, we won't find anymore metadata, skip to the end |
@@ -123,3 +123,3 @@ "use strict"; | ||
}); | ||
if (!jpeg_decoder_1.JPEGDecoder.isLikelyJPEG(jpegBuffer)) | ||
if (!jpeg_decoder_1.JPEGDecoder.isJPEG(jpegBuffer)) | ||
return; | ||
@@ -159,2 +159,5 @@ const jpeg = new jpeg_decoder_1.JPEGDecoder(jpegBuffer); | ||
} | ||
// If there are too many candidates to evaluate, don't guess randomly | ||
if (startCandidates.length * endCandidates.length > 25) | ||
return undefined; | ||
let jpeg; | ||
@@ -170,2 +173,3 @@ let maxWidth = -Infinity; | ||
continue; | ||
log(`evaluating possible embedded JPEG from ${startIndex} to ${endIndex}`); | ||
const jpegBuffer = buffer.slice(startIndex, endIndex + 1); | ||
@@ -172,0 +176,0 @@ if (!jpeg_decoder_1.JPEGDecoder.isJPEG(jpegBuffer)) |
@@ -146,2 +146,3 @@ import {TIFFDecoder} from '../decoder/tiff-decoder' | ||
while (marker !== END_OF_IMAGE && reader.hasNext()) { | ||
log(`read marker ${marker.toString(16)}`) | ||
if (marker === START_OF_SCAN) { | ||
@@ -148,0 +149,0 @@ // If we reached the scan data, we won't find anymore metadata, skip to the end |
@@ -160,3 +160,3 @@ import {IFD} from '../decoder/ifd' | ||
if (!JPEGDecoder.isLikelyJPEG(jpegBuffer)) return | ||
if (!JPEGDecoder.isJPEG(jpegBuffer)) return | ||
@@ -201,2 +201,5 @@ const jpeg = new JPEGDecoder(jpegBuffer) | ||
// If there are too many candidates to evaluate, don't guess randomly | ||
if (startCandidates.length * endCandidates.length > 25) return undefined | ||
let jpeg: IBufferLike | undefined | ||
@@ -210,2 +213,3 @@ let maxWidth = -Infinity | ||
log(`evaluating possible embedded JPEG from ${startIndex} to ${endIndex}`) | ||
const jpegBuffer = buffer.slice(startIndex, endIndex + 1) | ||
@@ -212,0 +216,0 @@ if (!JPEGDecoder.isJPEG(jpegBuffer)) continue |
{ | ||
"name": "@eris/exif", | ||
"version": "0.4.2-alpha.15", | ||
"version": "0.4.2-alpha.16", | ||
"description": "Parses EXIF data.", | ||
@@ -41,3 +41,3 @@ "main": "./dist/index.js", | ||
}, | ||
"gitHead": "61be137dec5c0d3a2dafd1065611f3091dbbd60c" | ||
"gitHead": "77e41258fa8ab4ca0212eab8d4612c0e7331a1ab" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
277471
5048