Type Default Value Read Only Static Description
ExifData null Yes No The Exif data.

This property allows access to Exif metadata in the image. If the image does not contain any Exif metadata this property will be null.

Note that by default Exif metadata is not read from the image, you must set ReadExif to true in the load options.

See Also




This property holds the collection of Exif data records that were found in the image file. If you want to read them you might use the following code:


XImageLoadOptions loadOptions = new XImageLoadOptions();
loadOptions.ReadExif = true;
XImage image = XImage.FromFile(Server.MapPath("rez/exif.jpg"), loadOptions);
if (image.Exif != null) {
  string txt = "Make: " + image.Exif["make"].Value + "\r\n";
  txt += "Model: " + image.Exif["model"].Value + "\r\n";
  foreach (ExifRecord ip in image.Exif) {
    txt += "Name: " + ip.Name + "\r\n";
    txt += "Value: " + ip.Value + "\r\n";

[Visual Basic]

Dim loadOptions As New XImageLoadOptions()
loadOptions.ReadExif = True
Dim image As XImage = XImage.FromFile(Server.MapPath("rez/exif.jpg"), loadOptions)
If image.Exif IsNot Nothing Then
  Dim txt As String = "Make: " & image.Exif("make").Value & vbCr & vbLf
  txt += "Model: " & image.Exif("model").Value & vbCr & vbLf
  For Each ip As ExifRecord In image.Exif
    txt += "Name: " & ip.Name & vbCr & vbLf
    txt += "Value: " & ip.Value & vbCr & vbLf
End If

This might produce the following output:

 Make: SANYO Electric Co.,Ltd.
 Model: SX113
 Name: Compression
 Value: 6
 Name: ImageDescription
 Name: Make
 Value: SANYO Electric Co.,Ltd.
 Name: Model
 Value: SX113
 Name: Orientation
 Value: 1
 Name: XResolution
 Value: 72/1
 Name: YResolution
 Value: 72/1
 Name: ResolutionUnit
 Value: 2
 Name: Software
 Value: V113p-73
 Name: DateTime
 Value: 2000:11:18 21:14:19
 Name: ThumbnailOffset
 Value: 1070
 Name: ThumbnailLength
 Value: 13234
 Name: YCbCrPositioning
 Value: 2
 Name: ExifOffset
 Value: 284