Magick.NET: EXIF data not available
Hi,
I tried to use the EXIF data from my images but I do always get “null”. With another library (MetadataExtractor, which is a bit oversized for me…) I can read the information so it is available.
The code used is the one found inside the documentation:
// Read image from file
using (MagickImage image = new MagickImage("FujiFilmFinePixS1Pro.jpg"))
{
// Retrieve the exif information
ExifProfile profile = image.GetExifProfile();
// Check if image contains an exif profile
if (profile == null)
Console.WriteLine("Image does not contain exif information.");
else
{
// Write all values to the console
foreach (ExifValue value in profile.Values)
{
Console.WriteLine("{0}({1}): {2}", value.Tag, value.DataType, value.ToString());
}
}
}
profile is always null. Test image: https://www.48design.de/downloads/raw_images/raw_image.7z
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 19 (10 by maintainers)
For the tiff format you will need to iterate through the
image.AttributeNames
and find the attributes thats start with"exif:"
but you cannot get them as an ExifValue. And it looks like we only setdng:
attributes for the RAW files at the moment. Already did some investigating into how we could parse the exif information but that won’t be easy. Will need to do some more research when I have some free time to check this.