Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test all Canon lenses #1428

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 61 additions & 63 deletions src/canonmn_int.cpp

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/tags_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2204,7 +2204,11 @@ namespace Exiv2 {

float fnumber(float apertureValue)
{
return std::exp(std::log(2.0F) * apertureValue / 2.F);
float result = std::exp(std::log(2.0F) * apertureValue / 2.F);
if (std::abs(result - 3.5) < 0.1) {
result = 3.5;
}
return result;
}

URational exposureTime(float shutterSpeedValue)
Expand Down
10 changes: 5 additions & 5 deletions test/data/exiv2-test.out
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ File 6/15: 20030925_201850.jpg
20030925_201850.jpg Exif.CanonCs.0x0015 Short 1 32767
20030925_201850.jpg Exif.CanonCs.LensType Short 1 n/a
20030925_201850.jpg Exif.CanonCs.Lens Short 3 18.0 - 55.0 mm
20030925_201850.jpg Exif.CanonCs.MaxAperture Short 1 F3.6
20030925_201850.jpg Exif.CanonCs.MaxAperture Short 1 F3.5
20030925_201850.jpg Exif.CanonCs.MinAperture Short 1 F22
20030925_201850.jpg Exif.CanonCs.FlashActivity Short 1 Did not fire
20030925_201850.jpg Exif.CanonCs.FlashDetails Short 1
Expand Down Expand Up @@ -2690,7 +2690,7 @@ Compare image data and extracted data ------------------------------------
< 20030925_201850.jpg Exif.CanonCs.0x0015 Short 1 32767
< 20030925_201850.jpg Exif.CanonCs.LensType Short 1 n/a
< 20030925_201850.jpg Exif.CanonCs.Lens Short 3 18.0 - 55.0 mm
< 20030925_201850.jpg Exif.CanonCs.MaxAperture Short 1 F3.6
< 20030925_201850.jpg Exif.CanonCs.MaxAperture Short 1 F3.5
< 20030925_201850.jpg Exif.CanonCs.MinAperture Short 1 F22
< 20030925_201850.jpg Exif.CanonCs.FlashActivity Short 1 Did not fire
< 20030925_201850.jpg Exif.CanonCs.FlashDetails Short 1
Expand Down Expand Up @@ -4231,7 +4231,7 @@ Compare image data and extracted data ------------------------------------
> 20030925_201850.exv Exif.CanonCs.0x0015 Short 1 32767
> 20030925_201850.exv Exif.CanonCs.LensType Short 1 n/a
> 20030925_201850.exv Exif.CanonCs.Lens Short 3 18.0 - 55.0 mm
> 20030925_201850.exv Exif.CanonCs.MaxAperture Short 1 F3.6
> 20030925_201850.exv Exif.CanonCs.MaxAperture Short 1 F3.5
> 20030925_201850.exv Exif.CanonCs.MinAperture Short 1 F22
> 20030925_201850.exv Exif.CanonCs.FlashActivity Short 1 Did not fire
> 20030925_201850.exv Exif.CanonCs.FlashDetails Short 1
Expand Down Expand Up @@ -5992,7 +5992,7 @@ Compare original and inserted image data ---------------------------------
< 20030925_201850.jpg Exif.CanonCs.0x0015 Short 1 32767
< 20030925_201850.jpg Exif.CanonCs.LensType Short 1 n/a
< 20030925_201850.jpg Exif.CanonCs.Lens Short 3 18.0 - 55.0 mm
< 20030925_201850.jpg Exif.CanonCs.MaxAperture Short 1 F3.6
< 20030925_201850.jpg Exif.CanonCs.MaxAperture Short 1 F3.5
< 20030925_201850.jpg Exif.CanonCs.MinAperture Short 1 F22
< 20030925_201850.jpg Exif.CanonCs.FlashActivity Short 1 Did not fire
< 20030925_201850.jpg Exif.CanonCs.FlashDetails Short 1
Expand Down Expand Up @@ -7533,7 +7533,7 @@ Compare original and inserted image data ---------------------------------
> 20030925_201850.exv Exif.CanonCs.0x0015 Short 1 32767
> 20030925_201850.exv Exif.CanonCs.LensType Short 1 n/a
> 20030925_201850.exv Exif.CanonCs.Lens Short 3 18.0 - 55.0 mm
> 20030925_201850.exv Exif.CanonCs.MaxAperture Short 1 F3.6
> 20030925_201850.exv Exif.CanonCs.MaxAperture Short 1 F3.5
> 20030925_201850.exv Exif.CanonCs.MinAperture Short 1 F22
> 20030925_201850.exv Exif.CanonCs.FlashActivity Short 1 Did not fire
> 20030925_201850.exv Exif.CanonCs.FlashDetails Short 1
Expand Down
Binary file added test/data/template.exv
Binary file not shown.
Loading