Enhancement: exposure comp in preview's image info (issue 954)
This commit is contained in:
@@ -90,6 +90,7 @@ ImageData::ImageData (Glib::ustring fname, RawMetaDataLocation* ri) {
|
||||
make = "Unknown";
|
||||
model = "Unknown";
|
||||
orientation = "Unknown";
|
||||
expcomp = 0;
|
||||
focal_len = 0;
|
||||
memset (&time, 0, sizeof(time));
|
||||
}
|
||||
@@ -106,6 +107,7 @@ void ImageData::extractInfo () {
|
||||
model = "";
|
||||
serial = "";
|
||||
orientation = "";
|
||||
expcomp = 0;
|
||||
shutter = 0;
|
||||
aperture = 0;
|
||||
focal_len = 0;
|
||||
@@ -165,6 +167,8 @@ void ImageData::extractInfo () {
|
||||
aperture = exif->getTag ("ApertureValue")->toDouble ();
|
||||
if (exif->getTag ("FNumber"))
|
||||
aperture = exif->getTag ("FNumber")->toDouble ();
|
||||
if (exif->getTag ("ExposureBiasValue"))
|
||||
expcomp = exif->getTag ("ExposureBiasValue")->toDouble ();
|
||||
if (exif->getTag ("FocalLength"))
|
||||
focal_len = exif->getTag ("FocalLength")->toDouble ();
|
||||
if (exif->getTag ("ISOSpeedRatings"))
|
||||
@@ -334,6 +338,17 @@ std::string ImageMetaData::shutterToString (double shutter) {
|
||||
return buffer;
|
||||
}
|
||||
|
||||
std::string ImageMetaData::expcompToString (double expcomp) {
|
||||
|
||||
char buffer[256];
|
||||
if (expcomp!=0.0){
|
||||
sprintf (buffer, "%0.1f", expcomp);
|
||||
return buffer;
|
||||
}
|
||||
else
|
||||
return "";
|
||||
}
|
||||
|
||||
double ImageMetaData::shutterFromString (std::string s) {
|
||||
|
||||
int i = s.find_first_of ('/');
|
||||
|
Reference in New Issue
Block a user