Read EXIF and IPTC
Reads EXIF and IPTC metadata.
Сode Snippet
using (var jpegReader = new JpegReader("Chicago.jpg"))
{
// Read metadata
var exif = jpegReader.Exif;
var iptc = jpegReader.Iptc;
// Show EXIF tags
if (exif != null)
{
Console.WriteLine("EXIF");
Console.WriteLine("---------------");
foreach (object key in exif.Keys)
{
Console.WriteLine("{0}: {1}, {2}", exif.GetKeyDescription(key), exif[key], exif.GetItemString(key));
}
}
// Show IPTC tags
if (iptc != null)
{
Console.WriteLine("IPTC");
Console.WriteLine("---------------");
foreach (long key in iptc.Keys)
{
Console.WriteLine("{0}: {1}, {2}", iptc.GetKeyDescription(key), iptc[key], iptc.GetItemString(key));
}
}
}
Input
Chicago.jpg
Output
ReadExifIptc.txt
EXIF
---------------
Image input equipment manufacturer: FUJIFILM, FUJIFILM
Image input equipment model: FinePix F45fd , FinePix F45fd
Orientation of image: 1, normal
Image resolution in width direction: 72/1, 72/1
Image resolution in height direction: 72/1, 72/1
Resolution unit: 2, inches
Software used: GIMP 2.8.10, GIMP 2.8.10
File change date and time: 2014:07:14 14:03:17, 2014:07:14 14:03:17
Y and C positioning: 2, co-sited
Copyright holder: ,
Offset to ExifIFD: 264, 264
: System.Byte[], P r i n t I M
Exposure time: 10/4500, 10/4500
F number: 500/100, 500/100
Exposure program: 2, normal
ISO speed rating: 100, 100
Exif version: System.Byte[], 0220
Date and time of original data generation: 2008:08:14 23:22:53, 2008:08:14 23:22:53
Date and time of digital data generation: 2008:08:14 23:22:53, 2008:08:14 23:22:53
Meaning of each component: System.Byte[],
Image compression mode: 20/10, 20/10
Shutter speed: 886/100, 886/100
Aperture: 460/100, 460/100
Brightness: 880/100, 880/100
Exposure bias: 0/100, 0/100
Maximum lens aperture: 300/100, 300/100
Metering mode: 5, pattern
Light source: 0, unknown
Flash: 16, flash did not fire
Lens focal length: 800/100, 800/100
Supported FlashPix version: System.Byte[], 0100
Color space information: 1, sRGB
Valid image width: 600, 600
Valid image height: 450, 450
Pointer of Interoperability IFD: 818, 818
Focal plane X resolution: 4236/1, 4236/1
Focal plane Y resolution: 4236/1, 4236/1
Focal plane resolution unit: 3, centimeter
Sensing method: 2, one-chip color area sensor
File source: System.Byte[], digital still camera
Scene type: System.Byte[], a directly photographed image
Custom image processing: 0, normal process
Exposure mode: 0, auto exposure
White balance: 0, auto white balance
Scene capture type: 0, standard
Sharpness: 0, normal
Subject distance range: 0, unknown
Interoperability identification: R98, R98
: System.Byte[], 0 1 0 0
Thumbnail compression scheme: 6, jpeg
Thumbnail resolution in width direction: 7200000/100000, 7200000/100000
Thumbnail resolution in height direction: 7200000/100000, 7200000/100000
Thumbnail resolution unit: 2, inches
Thumbnail offset to JPEG SOI: 942, 942
Thumbnail bytes of JPEG data: 11670, 11670
Thumbnail: Aurigma.GraphicsMill.Bitmap,
For AI-assisted development: Download Graphics Mill Code Samples XML Catalog