How to access a JPEG's EXIF tag

Some JPEG images have Exchangeable Image File (EXIF) format tags stored in the header. The code example in this article shows how to access the EXIF information.

Accessing a JPEG's EXIF tag

Use the following code example 
static void JPEG_EXIFtag(IRasterDataset exifDataset)throws Exception{
    //exifDataset represents the raster dataset opened from a JPEG file that has an EXIF tag.
    IDataset dataset = new IDatasetProxy(exifDataset);
    //Get the EXIF tags and the associated values.
    IPropertySet propertySet = dataset.getPropertySet();
    Object[] tag_names = new Object[1];
    Object[] tag_values = new Object[1];
    propertySet.getAllProperties(tag_names, tag_values);
    String[] stringNames = (String[])tag_names[0];
    Object[] stringValues = (Object[])tag_values[0];
    for (int i = 0; i <= stringNames.length - 1; i++){
        System.out.print(stringNames[i] + ":");

Development licensingDeployment licensing
ArcGIS for Desktop AdvancedArcGIS for Desktop Advanced
ArcGIS for Desktop StandardArcGIS for Desktop Standard
ArcGIS for Desktop BasicArcGIS for Desktop Basic
Engine Developer KitEngine