Skip to content

[BUG]: pick Option Excludes Certain Tags Like ImageSource #131

@avinash-skylarkdrones

Description

@avinash-skylarkdrones

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

  1. 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', ... }
  2. 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
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions