Skip to content

Error in the code example #10242

@mekomlusa

Description

@mekomlusa

First of all, thank you so much for providing the code example. As a newbie in C# I had a hard time trying to get the manufacturer information from image EXIF meta, and the code snippet provided here is a great starting point. However, this piece of code (checking manufacturer) seems to be working for images taken by iOS only. When I tested it on an image taken by OnePlus, it's not returning the string as expected. That's because the code currently has string manufacturer = encoding.GetString(propItems[1].Value);. Manufacturer information does not always shows as the first item in the PropertyItems list. It's associated with Id 271 though. So I think the code should be updated as string manufacturer = encoding.GetString(image.GetPropertyItem(271).Value);. I was able to see the manufacturer string of OnePlus images correctly then.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions