I'm using Exiv2 to take the metadata of photograph. I would like to use some value of these metadata. but I have no idea how to convert exiv2 value to int. here is my souse cord.
int metadetascanner(const char* img)
{
try
{
Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(img);
image->readMetadata();
Exiv2::ExifData &exif = image->exifData();
Exiv2::Exifdatum &rotation = exif["Exif.Image.Orientation"];
if (exif.empty())
{
cerr << "no exif" << endl;
return -1;
}
int a = rotation.value();
return a;
}
catch (Exiv2::Error& e)
{
cout << e.what() << endl;
return -1;
}
}
I just write "int a = rotation.value(); " but I know it can not be like this.
I will really appreciate you if you help me.