[Digikam-devel] [Bug 103255] wish: *add* (not edit) EXIF headers like date, comment etc
Gilles Caulier
caulier.gilles at free.fr
Tue Oct 24 12:03:01 BST 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=103255
------- Additional Comments From caulier.gilles free fr 2006-10-24 13:03 -------
SVN commit 598657 by cgilles:
kipiplugins from trunk : MetadataEdit plugin: Exif Exposure informations editor: handle Exposure Index settings accordinly with ISO Speed Rating settings
CCBUGS: 103255
M +22 -0 exifexposure.cpp
--- trunk/extragear/libs/kipi-plugins/metadataedit/exifexposure.cpp #598656:598657
@ -318,6 +318,20 @
d->ISOSpeedCheck->setChecked(true);
}
}
+ else if (exiv2Iface.getExifTagRational("Exif.Photo.ExposureIndex", num, den))
+ {
+ val = num / den;
+ int item = -1;
+ for (int i = 0 ; i < d->ISOSpeedCB->count() ; i++)
+ if (d->ISOSpeedCB->text(i) == QString::number(val))
+ item = i;
+
+ if (item != -1)
+ {
+ d->ISOSpeedCB->setCurrentItem(item);
+ d->ISOSpeedCheck->setChecked(true);
+ }
+ }
d->ISOSpeedCB->setEnabled(d->ISOSpeedCheck->isChecked());
}
@ -371,9 +385,17 @
exiv2Iface.removeExifTag("Exif.Photo.MeteringMode");
if (d->ISOSpeedCheck->isChecked())
+ {
exiv2Iface.setExifTagLong("Exif.Photo.ISOSpeedRatings", d->ISOSpeedCB->currentText().toLong());
+
+ exiv2Iface.convertToRational(d->ISOSpeedCB->currentText().toDouble(), &num, &den, 1);
+ exiv2Iface.setExifTagRational("Exif.Photo.ExposureIndex", num, den);
+ }
else
+ {
exiv2Iface.removeExifTag("Exif.Photo.ISOSpeedRatings");
+ exiv2Iface.removeExifTag("Exif.Photo.ExposureIndex");
+ }
exifData = exiv2Iface.getExif();
}
More information about the Digikam-devel
mailing list