Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
avinash-skylarkdrones opened this issue Dec 24, 2024 · 0 comments
Open

Comments

@avinash-skylarkdrones
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant