Read XMP Metadata
Reads all XMP properties.
Сode Snippet
using (var reader = new JpegReader("Chicago.jpg"))
{
if (reader.Xmp != null)
{
var xmp = new XmpData(reader.Xmp);
foreach (XmpNode node in xmp.Values)
{
if (node.NodeType == XmpNodeType.SimpleProperty)
{
Console.WriteLine("{0}: {1}", node.Name, node);
}
}
}
}
Input
Chicago.jpg
Output
ReadXmpMetadata.txt
exif:ApertureValue: 4,60 EV (f/4,9)
exif:ExposureBiasValue: 0,00 EV
exif:ExposureProgram: Normal program
exif:Sharpness: Normal
exif:YCbCrPositioning: Co-sited
exif:SubjectDistanceRange: Unknown
exif:WhiteBalance: Auto white balance
exif:FlashPixVersion: FlashPix Version 1.0
xmp:CreateDate: 2008:08:14 23:22:53
exif:FNumber: f/5,0
exif:InteroperabilityVersion: 0100
exif:SensingMethod: One-chip color area sensor
exif:BrightnessValue: 8,80 EV (1527,16 cd/m^2)
exif:CustomRendered: Normal process
exif:ShutterSpeedValue: 8,86 EV (1/464 sec.)
exif:ResolutionUnit: Inch
exif:DateTime: 2008:08:14 23:22:53
exif:Orientation: Top-left
exif:ExifVersion: Exif Version 2.2
exif:YResolution: 72
exif:PixelYDimension: 2472
exif:ColorSpace: sRGB
exif:Software: Digital Camera FinePix F45fd Ver1.02
exif:FocalLength: 8,0 mm
exif:CompressedBitsPerPixel: 2,0
exif:LightSource: Unknown
exif:FileSource: DSC
exif:Copyright: [None] (Photographer) - (Editor)
exif:Model: FinePix F45fd
exif:Make: FUJIFILM
exif:InteroperabilityIndex: R98
exif:SceneType: Directly photographed
exif:PixelXDimension: 3296
exif:ExposureMode: Auto exposure
exif:FocalPlaneYResolution: 4236
exif:DateTimeOriginal: 2008:08:14 23:22:53
exif:SceneCaptureType: Standard
exif:ExposureTime: 1/450 sec.
exif:MeteringMode: Pattern
exif:XResolution: 72
exif:FocalPlaneResolutionUnit: Centimeter
exif:MakerNote: 418 bytes undefined data
exif:FocalPlaneXResolution: 4236
exif:MaxApertureValue: 3,00 EV (f/2,8)
exif:PrintImageMatching: 28 bytes undefined data
exif:Compression: JPEG compression
For AI-assisted development: Download Graphics Mill Code Samples XML Catalog