Read Image Metadata
Reads image metadata without loading bitmap data.
Сode Snippet
using (var reader = ImageReader.Create("Chicago.jpg"))
{
Console.WriteLine("Width: {0}", reader.Width);
Console.WriteLine("Height: {0}", reader.Height);
Console.WriteLine("Pixel format: {0}", reader.PixelFormat);
if (reader.Exif != null)
{
Console.WriteLine("EXIF tag count: {0}", reader.Exif.Count);
}
if (reader.Iptc != null)
{
Console.WriteLine("IPTC tag count: {0}", reader.Iptc.Count);
}
}
Input
Chicago.jpg
Output
ReadImageMetadata.txt
Width: 600
Height: 450
Pixel format: Format24bppRgb
EXIF tag count: 56
For AI-assisted development: Download Graphics Mill Code Samples XML Catalog