Type Default Value Read Only Static Description
ExifRecord None Yes No Access to individual Exif Records.
Notes

This property provides access to individual Exif records. The enumeration can also be indexed as illustrated by the example below.

See Also

Count

Item[String]

Example

The two blocks of code below are functionally equivalent, as explained above.

[C#]

XImageLoadOptions loadOptions = new XImageLoadOptions();
loadOptions.ReadExif = true;
XImage image = XImage.FromFile(Server.MapPath("rez/myexif.jpg"), loadOptions);
if (image.Exif != null) {
  foreach (ExifRecord exifrec in image.Exif) {
    Response.Write(exifrec.Name + ":" + exifrec.Value + "<br>");
  }
}
image = XImage.FromFile(Server.MapPath("rez/myimg.jpg"), loadOptions);
if (image.Exif != null) {
  for (int i = 0; i < image.Exif.Count; i++) {
    Response.Write(image.Exif[i].Name + ":" + image.Exif[i].Value + "<br>");
  }
}


[Visual Basic]

Dim loadOptions As New XImageLoadOptions()
loadOptions.ReadExif = True
Dim image As XImage = XImage.FromFile(Server.MapPath("rez/myexif.jpg"), loadOptions)
If image.Exif IsNot Nothing Then
  For Each exifrec As ExifRecord In image.Exif
    Response.Write((exifrec.Name & ":") + exifrec.Value & "<br>")
  Next
End If
image = XImage.FromFile(Server.MapPath("rez/myimg.jpg"), loadOptions)
If image.Exif IsNot Nothing Then
  For i As Integer = 0 To image.Exif.Count - 1
    Response.Write((image.Exif(i).Name & ":") + image.Exif(i).Value & "<br>")
  Next
End If