Update of /cvsroot/ufraw/ufraw
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv6145
Modified Files:
ufraw_exiv2.cc
Log Message:
Use Exiv2 easy access functions when available.
Index: ufraw_exiv2.cc
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw_exiv2.cc,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- ufraw_exiv2.cc 1 Jan 2013 04:00:17 -0000 1.65
+++ ufraw_exiv2.cc 20 Jan 2013 05:30:14 -0000 1.66
@@ -73,24 +73,12 @@
/* List of tag names taken from exiv2's printSummary() in actions.cpp
*/
Exiv2::ExifData::const_iterator pos;
/* Read shutter time */
- if ((pos = exifData.findKey(Exiv2::ExifKey("Exif.Photo.ExposureTime")))
- != exifData.end()) {
+ if ((pos = Exiv2::exposureTime(exifData)) != exifData.end()) {
uf_strlcpy_to_utf8(uf->conf->shutterText, max_name, pos, exifData);
uf->conf->shutter = pos->toFloat();
- } else if ((pos = exifData.findKey(
- Exiv2::ExifKey("Exif.Photo.ShutterSpeedValue")))
- != exifData.end()) {
- uf_strlcpy_to_utf8(uf->conf->shutterText, max_name, pos, exifData);
- uf->conf->shutter = 1.0 / pos->toFloat();
}
/* Read aperture */
- if ((pos = exifData.findKey(Exiv2::ExifKey("Exif.Photo.FNumber")))
- != exifData.end()) {
- uf_strlcpy_to_utf8(uf->conf->apertureText, max_name, pos,
exifData);
- uf->conf->aperture = pos->toFloat();
- } else if ((pos = exifData.findKey(
- Exiv2::ExifKey("Exif.Photo.ApertureValue")))
- != exifData.end()) {
+ if ((pos = Exiv2::fNumber(exifData)) != exifData.end()) {
uf_strlcpy_to_utf8(uf->conf->apertureText, max_name, pos,
exifData);
uf->conf->aperture = pos->toFloat();
}
@@ -99,12 +87,7 @@
uf_strlcpy_to_utf8(uf->conf->isoText, max_name, pos, exifData);
}
/* Read focal length */
- if ((pos = exifData.findKey(Exiv2::ExifKey("Exif.Photo.FocalLength")))
- != exifData.end()) {
- uf_strlcpy_to_utf8(uf->conf->focalLenText, max_name, pos,
exifData);
- uf->conf->focal_len = pos->toFloat();
- } else if ((pos = exifData.findKey(Exiv2::ExifKey(
- "Exif.Canon.FocalLength"))) !=
exifData.end()) {
+ if ((pos = Exiv2::focalLength(exifData)) != exifData.end()) {
uf_strlcpy_to_utf8(uf->conf->focalLenText, max_name, pos,
exifData);
uf->conf->focal_len = pos->toFloat();
}
@@ -124,17 +107,14 @@
uf_strlcpy_to_utf8(uf->conf->flashText, max_name, pos, exifData);
}
/* Read White Balance Setting */
- if ((pos = exifData.findKey(Exiv2::ExifKey("Exif.Photo.WhiteBalance")))
- != exifData.end()) {
+ if ((pos = Exiv2::whiteBalance(exifData)) != exifData.end()) {
uf_strlcpy_to_utf8(uf->conf->whiteBalanceText, max_name, pos,
exifData);
}
- if ((pos = exifData.findKey(Exiv2::ExifKey("Exif.Image.Make")))
- != exifData.end()) {
+ if ((pos = Exiv2::make(exifData)) != exifData.end()) {
uf_strlcpy_to_utf8(uf->conf->real_make, max_name, pos, exifData);
}
- if ((pos = exifData.findKey(Exiv2::ExifKey("Exif.Image.Model")))
- != exifData.end()) {
+ if ((pos = Exiv2::model(exifData)) != exifData.end()) {
uf_strlcpy_to_utf8(uf->conf->real_model, max_name, pos, exifData);
}
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
_______________________________________________
ufraw-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ufraw-cvs