#1140 Fix submitted.

v0.27.3
Robin Mills 10 years ago
parent bb4017e2a2
commit b92dc7c8c9

@ -69,6 +69,9 @@ namespace Exiv2 {
std::ostream& printCsLensByFocalLengthTC(std::ostream& os, std::ostream& printCsLensByFocalLengthTC(std::ostream& os,
const Value& value, const Value& value,
const ExifData* metadata); const ExifData* metadata);
std::ostream& printCsLensFFFF(std::ostream& os,
const Value& value,
const ExifData* metadata);
//! ModelId, tag 0x0010 //! ModelId, tag 0x0010
extern const TagDetails canonModelId[] = { extern const TagDetails canonModelId[] = {
@ -990,7 +993,9 @@ namespace Exiv2 {
{ 250, printCsLensByFocalLength }, // not tested { 250, printCsLensByFocalLength }, // not tested
{ 255, printCsLensByFocalLength }, // not tested { 255, printCsLensByFocalLength }, // not tested
{ 493, printCsLensByFocalLength }, // not tested { 493, printCsLensByFocalLength }, // not tested
{ 4143,printCsLensByFocalLength } // not tested { 4143,printCsLensByFocalLength }, // not tested
{ 4154,printCsLensByFocalLength }, // not tested
{0xffff,printCsLensFFFF }
}; };
//! FlashActivity, tag 0x001c //! FlashActivity, tag 0x001c
@ -1575,6 +1580,23 @@ namespace Exiv2 {
return os; return os;
} }
std::ostream& printCsLensFFFF(std::ostream& os,
const Value& value,
const ExifData* metadata)
{
try {
# 1140
if( metadata->findKey(ExifKey("Exif.Image.Model" ))->value().toString() == "Canon EOS 30D"
&& metadata->findKey(ExifKey("Exif.CanonCs.Lens" ))->value().toString() == "24 24 1"
&& metadata->findKey(ExifKey("Exif.Photo.FocalLength" ))->value().toString() == "24/1"
){
return os << "Canon EF-S 24mm f/2.8 STM" ;
}
} catch (std::exception& e) {};
return EXV_PRINT_TAG(canonCsLensType)(os, value, metadata);
}
//! Helper structure //! Helper structure
struct LensTypeAndFocalLengthAndMaxAperture { struct LensTypeAndFocalLengthAndMaxAperture {
long lensType_; //!< Lens type long lensType_; //!< Lens type

@ -448,6 +448,13 @@ source ./functions.source
runTest exiv2 -PkV --grep GPSL http://dev.exiv2.org/attachments/download/805/DSC_7154.jpg | runTest exiv2 -m- $filename runTest exiv2 -PkV --grep GPSL http://dev.exiv2.org/attachments/download/805/DSC_7154.jpg | runTest exiv2 -m- $filename
runTest exiv2 -pa $filename runTest exiv2 -pa $filename
num=1140
filename=exiv2-bug$num.exv
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
runTest exiv2 -pv -g Lens $filename
) 3>&1 > $results 2>&1 ) 3>&1 > $results 2>&1

Binary file not shown.

Binary file not shown.
Loading…
Cancel
Save