@eris/exif
Advanced tools
Comparing version 0.4.2-alpha.19 to 0.4.2-alpha.20
@@ -17,3 +17,6 @@ /// <reference types="node" /> | ||
/** | ||
* Panasonic mislabels all of their tags so the names make no sense. | ||
* Modern RW2 use a proprietary tag for the JPEG (0x2e - JpgFromRaw) | ||
* @see https://github.com/exiftool/exiftool/blob/2f235f9a5618336f199c6481b452836c55de6b0c/lib/Image/ExifTool/PanasonicRaw.pm#L198-L215 | ||
* | ||
* Older Panasonic raw mislabels all of their tags so the names make no sense. | ||
* The only thing they really label is the offset of the RAW data and the JPEG is before that. | ||
@@ -20,0 +23,0 @@ * So we'll just search for JPEG markers in between the IFDs and the offset of the raw data. |
@@ -187,3 +187,6 @@ "use strict"; | ||
/** | ||
* Panasonic mislabels all of their tags so the names make no sense. | ||
* Modern RW2 use a proprietary tag for the JPEG (0x2e - JpgFromRaw) | ||
* @see https://github.com/exiftool/exiftool/blob/2f235f9a5618336f199c6481b452836c55de6b0c/lib/Image/ExifTool/PanasonicRaw.pm#L198-L215 | ||
* | ||
* Older Panasonic raw mislabels all of their tags so the names make no sense. | ||
* The only thing they really label is the offset of the RAW data and the JPEG is before that. | ||
@@ -196,2 +199,8 @@ * So we'll just search for JPEG markers in between the IFDs and the offset of the raw data. | ||
const ifdEntries = this.extractIFDEntries(); | ||
const jpgFromRawEntry = ifdEntries.find(entry => entry.tag === types_1.IFDTag.JpgFromRaw); | ||
if (jpgFromRawEntry) { | ||
const value = jpgFromRawEntry.getValue(this._reader); | ||
if (Buffer.isBuffer(value)) | ||
return value; | ||
} | ||
const searchStart = Math.max(...ifdEntries.map(value => value.startOffset)); | ||
@@ -198,0 +207,0 @@ const endEntry = this._ifds[0].entries.find(entry => entry.tag === types_1.IFDTag.PanasonicJPEGEnd); |
@@ -67,2 +67,3 @@ /// <reference types="node" /> | ||
export declare enum IFDTag { | ||
JpgFromRaw = 46, | ||
Compression = 259, | ||
@@ -69,0 +70,0 @@ StripOffsets = 273, |
@@ -12,2 +12,3 @@ "use strict"; | ||
(function (IFDTag) { | ||
IFDTag[IFDTag["JpgFromRaw"] = 46] = "JpgFromRaw"; | ||
IFDTag[IFDTag["Compression"] = 259] = "Compression"; | ||
@@ -14,0 +15,0 @@ IFDTag[IFDTag["StripOffsets"] = 273] = "StripOffsets"; |
@@ -228,3 +228,6 @@ import {IFD} from '../decoder/ifd' | ||
/** | ||
* Panasonic mislabels all of their tags so the names make no sense. | ||
* Modern RW2 use a proprietary tag for the JPEG (0x2e - JpgFromRaw) | ||
* @see https://github.com/exiftool/exiftool/blob/2f235f9a5618336f199c6481b452836c55de6b0c/lib/Image/ExifTool/PanasonicRaw.pm#L198-L215 | ||
* | ||
* Older Panasonic raw mislabels all of their tags so the names make no sense. | ||
* The only thing they really label is the offset of the RAW data and the JPEG is before that. | ||
@@ -236,2 +239,9 @@ * So we'll just search for JPEG markers in between the IFDs and the offset of the raw data. | ||
const ifdEntries = this.extractIFDEntries() | ||
const jpgFromRawEntry = ifdEntries.find(entry => entry.tag === IFDTag.JpgFromRaw) | ||
if (jpgFromRawEntry) { | ||
const value = jpgFromRawEntry.getValue(this._reader) | ||
if (Buffer.isBuffer(value)) return value | ||
} | ||
const searchStart = Math.max(...ifdEntries.map(value => value.startOffset)) | ||
@@ -238,0 +248,0 @@ const endEntry = this._ifds[0].entries.find(entry => entry.tag === IFDTag.PanasonicJPEGEnd) |
@@ -78,2 +78,3 @@ export interface ILogger { | ||
export enum IFDTag { | ||
JpgFromRaw = 46, // 0x2e - Panasonic-specific | ||
Compression = 259, | ||
@@ -80,0 +81,0 @@ StripOffsets = 273, |
{ | ||
"name": "@eris/exif", | ||
"version": "0.4.2-alpha.19", | ||
"version": "0.4.2-alpha.20", | ||
"description": "Parses EXIF data.", | ||
@@ -41,3 +41,3 @@ "main": "./dist/index.js", | ||
}, | ||
"gitHead": "7b7e6677c8003d01ca492c3292e16c1735e31f03" | ||
"gitHead": "c6ba7596a97d36f68fbadcdf0ccaf3e951277ca2" | ||
} |
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
281854
5119