Bug 335666 - Has unsharp allows for radius <= 1 and it ignores the decimal part
Summary: Has unsharp allows for radius <= 1 and it ignores the decimal part
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Editor-Sharpen (show other bugs)
Version: 4.0.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-01 21:48 UTC by pochini
Modified: 2017-08-07 07:16 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.1.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pochini 2014-06-01 21:48:10 UTC
Unsharp mask tool allows the user to set a radius <= 1.0 and in that case is just overexposes the image. Furthermore, it ignores the decimal part of the number. Any value between 1.01 and 1.99, 2.00-2.99 and so on are the same. It behaves like very old versions of digikam. I checked v4.0.0-beta4 and it does not have this issue.

Reproducible: Always
Comment 1 caulier.gilles 2014-06-02 14:12:15 UTC
Git commit 86f5988b7b15b9de8e93750ad5d40db434ab8361 by Gilles Caulier.
Committed on 02/06/2014 at 14:09.
Pushed by cgilles into branch 'master'.

With 4.0.0 release, blur filter algorithm have been changed, and radius argument precision have been dropped due to use an interger value intead a float value.
This commit fix this wrong cast to take a acre about radius precision with UnsharpMask filter
FIXED-IN: 4.1.0

M  +3    -1    NEWS
M  +3    -3    imageplugins/enhance/sharpentool.cpp
M  +1    -1    imageplugins/enhance/sharpentool.h
M  +25   -24   libs/dimg/filters/sharp/sharpsettings.cpp
M  +1    -1    libs/dimg/filters/sharp/sharpsettings.h
M  +4    -4    libs/dimg/filters/sharp/unsharpmaskfilter.cpp
M  +2    -2    libs/dimg/filters/sharp/unsharpmaskfilter.h

http://commits.kde.org/digikam/86f5988b7b15b9de8e93750ad5d40db434ab8361
Comment 2 pascalio 2014-11-08 12:52:19 UTC
Hello,
I'm sorry to say so but the bug doesn't seem to be fixed to me... In digikam 4.2.0 (from Ubuntu's repositories, Ubuntu 14.10) the USM still overexposes images with radius < 1 and "amount" param sets the amount of overexposition... Moreover, radius > 1 results in massive over-sharpening as compared to 3.5.0's behaviour: I used to batch process some pictures in 3.5.0 with radius = 8, amount = 1 and threshold = 0.05 to get a subtly sharpened image, but the very same batch workflow in 4.2.0 yield a completely transformed image (ie. highly oversharpened, much more global contrast, looks like an enormous radius blur on top of an enormous USM contrast amount)

I compiled and installed 4.1.0 and the result was the same.
I get the same on to different machines running Ubuntu 14.10 and digikam 4.1.0 or 4.2.0.
Reproducible: still always