Skip to content
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
189 changes: 93 additions & 96 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 @@ -2489,7 +2489,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 @@ -1093,7 +1093,7 @@ File 6/16: 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 @@ -2734,7 +2734,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 @@ -4297,7 +4297,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 @@ -6098,7 +6098,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 @@ -7661,7 +7661,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