Meta-data Extraction

The ImageSDK can access meta-data from the opened image. This could for example be “GPS coordinates” or “aperture”.

This can be extracted by requesting the specific meta-data. For instance, requesting the “ISO” and writing the output to console, as follows:

P1::ImageSdk::ImageTag iso = image.GetTag(P1::ImageSdk::TagId::IsoSpeedRatings);
std::cout << "ISO " << iso.ToString() << std::endl;
ImageTag iso = image.GetTag(TagId.IsoSpeedRatings);
Console.WriteLine("ISO: {0}", iso);

Output:

ISO: 100

Tags

The image file contains a number of tags, each containing data about the image or the camera.

The images contain tags defined by the TIFF-standard (hereunder both TIFF- and EXIF-tags) and tags defined by Phase One (Phase One-tags). The Phase One-tags are proprietary to Phase One cameras and images.

The structure of TIFF-tags in IIQ files

Each tag has an ID and a value (the value can consist of several entries, e.g. a list). When extracting the tag, it is necessary to know the ID of the desired tag. In the ImageSDK, the most common tag-IDs for both TIFF-tags and Phase One-tags are predefined.

An example of tags being extracted can be seen below:

P1::ImageSdk::ImageTag apertureApex = image.GetTag(P1::ImageSdk::TagId::ApertureValue);
std::cout << "Aperture " << apertureApex.ToString() << std::endl;

P1::ImageSdk::ImageTag lensName = image.GetTag(P1::ImageSdk::TagId::LensName);
std::cout << "LensName " << lensName.ToString() << std::endl;
ImageTag apertureApex = image.GetTag(TagId.ApertureValue); //TIFF-tag
Console.WriteLine(" * Aperture: {0}", apertureApex);

ImageTag lensName = image.GetTag(TagId.LensName); //Phase One-tag
Console.WriteLine(" * LensName: {0}", lensName);

Output:

* Aperture: 49709 / 10000
* LensName: Rodenstock RS 90mm-Ar

Caution

Some tags may not be available in certain images, if no value exists for the tag. A tag’s existence can be investigated similarly to the extraction of the tag, by using the image.TagExists