Description of the Problem
When using the pick option in exifr.parse, certain tags like ImageSource are missing from the parsed result, even though they are correctly parsed when pick is not used.
Steps to Reproduce
-
Parse metadata without pick, and confirm ImageSource is included:
import exifr from "exifr";
const exif: Exif = await exifr.parse(file, { xmp: true });
console.log("EXIF:", exif); // { ..., ImageSource: 'InfraredCamera', ... }
-
Parse with pick including ImageSource:
import exifr from "exifr";
const exif: Option<Exif> = await exifr.parse(file, {
xmp: true,
pick: ["ImageSource"],
});
console.log("EXIF:", exif); // undefined
-
Parse with pick including multiple tags:
import exifr from "exifr";
const exif: Exif = await exifr.parse(file, {
xmp: true,
pick: ["Make", "ImageSource"],
});
console.log("EXIF:", exif); // { Make: 'DJI' }
Expected Behavior
ImageSource should be included in the result when explicitly specified in the pick array, even when it is the only element.
Actual Behavior
- Without
pick: ImageSource is present in the parsed result.
- With
pick: ['ImageSource']: The result is undefined.
- With
pick: ['Make', 'ImageSource']: Only Make is present in the result, while ImageSource is missing.
Environment Details
exifr version: v7.1.3
- Node.js version:
v18.20.4
- File type: JPEG/JPG
Description of the Problem
When using the
pickoption inexifr.parse, certain tags likeImageSourceare missing from the parsed result, even though they are correctly parsed whenpickis not used.Steps to Reproduce
Parse metadata without
pick, and confirmImageSourceis included:Parse with
pickincludingImageSource:Parse with
pickincluding multiple tags:Expected Behavior
ImageSourceshould be included in the result when explicitly specified in thepickarray, even when it is the only element.Actual Behavior
pick:ImageSourceis present in the parsed result.pick:['ImageSource']: The result isundefined.pick:['Make', 'ImageSource']: OnlyMakeis present in the result, whileImageSourceis missing.Environment Details
exifrversion:v7.1.3v18.20.4