Bug 169637 - EXIF Data Editing Error
Summary: EXIF Data Editing Error
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Generic-MetadataEdit (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-23 05:13 UTC by patmartini
Modified: 2018-03-23 11:43 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.2.0


Attachments
Three changes to fix the rounding issue for aperture values in the metadata (708 bytes, patch)
2008-11-24 16:18 UTC, Stefan
Details
Three changes to fix the rounding issue for aperture values in the metadata (1.46 KB, patch)
2008-11-26 10:34 UTC, Stefan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description patmartini 2008-08-23 05:13:56 UTC
Version:           0.9.4 (using 3.5.9 "release 49.1" , openSUSE 11.0)
Compiler:          Target: x86_64-suse-linux
OS:                Linux (x86_64) release 2.6.25.11-0.1-default

Selection of f5.6 in EXIF edit data saves as f5.5 in image file. I have not tried other f stop numbers. This is a minor issue.
Comment 1 Stefan 2008-11-24 16:18:16 UTC
Created attachment 28796 [details]
Three changes to fix the rounding issue for aperture values in the metadata

- replace the trunc function with the round function
- in the simple reduction loop, the denominator must be 0
- the brute force loop will only be started if the simple reduction fails
- tested for all aperture values
Comment 2 caulier.gilles 2008-11-24 20:00:11 UTC
Which are you patched exactly ?

Can you provide a diff using subversion like it explained here:

http://www.digikam.org/contrib

Thanks in advance

Gilles Caulier
Comment 3 Stefan 2008-11-26 10:34:50 UTC
Created attachment 28833 [details]
Three changes to fix the rounding issue for aperture values in the metadata

Three changes to fix the rounding issue for aperture values in the metadata

I have tested it for all aperture values, but not for other calls.
Comment 4 caulier.gilles 2008-11-26 10:40:03 UTC
Thanks Stephan for your patch.

Marcel,

Patch sound fine for me. Do you see another place where a similar fix must be done ?

Gilles
Comment 5 Marcel Wiesweg 2008-11-26 19:07:22 UTC
SVN commit 889398 by mwiesweg:

Fix from Stefan Beyer:
Change trunc to round.
Fixes the problem that e.g. (5.6 - trunc(5.6)) * 10.0^1 , or 0.6*10.0, can be something like 5.999999999999996447286321.

CCBUG: 169637


 M  +1 -1      kexiv2gps.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=889398
Comment 6 Marcel Wiesweg 2008-11-26 19:11:52 UTC
I have committed the trunc->round fix (see commit message for details).
I dont quite understand the other changes. A denominator may be anything but zero.
Comment 7 caulier.gilles 2008-11-27 07:36:59 UTC
Agree. I think your fix is enough (tested here)

I close this file now.

Gilles
Comment 8 caulier.gilles 2008-11-27 07:42:08 UTC
SVN commit 889546 by cgilles:

sync with trunk
CCBUG: 169637


 M  +3 -3      kexiv2.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=889546