[Digikam-devel] [digikam] [Bug 342513] Add support for fractional radius in blur and unsharp mask filters [patch]

pochini at shiny.it pochini at shiny.it
Sat Feb 14 11:50:06 GMT 2015


https://bugs.kde.org/show_bug.cgi?id=342513

pochini at shiny.it changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #90530|0                           |1
        is obsolete|                            |

--- Comment #11 from pochini at shiny.it ---
Created attachment 91070
  --> https://bugs.kde.org/attachment.cgi?id=91070&action=edit
Blur filter enhancement (v.3)

(In reply to Gilles Caulier from comment #9)
> > Some filters that have not been checked yet (watermark, redeyetool, blurfxfilter, >filtermanager?, infraredfilter). Am I missing something ?
> 
> Grep "BlurFilter" class name to identify where algorithm is used in digiKam
> core :
> 
> [gilles at localhost core]$ pwd                                                
> 
> /home/gilles/Devel/KF5/dk-sc/core 
> [gilles at localhost core]$ grep -r "BlurFilter" .

Yes, I know how to use grep and I wrote a list of the things to to yet... The
point is I could not test all those tools. I didn't figure out that some of
them are batch tools.


> ==> output filtered :
> 
> UnsharpedMask filter : ./libs/dimg/filters/sharp/unsharpmaskfilter.cpp:   
> BlurFilter(this, m_orgImage, m_destImage, 0, 10, (int)(m_radius*10.0));

Already fixed in the first patch.


> Infrared filter : ./libs/dimg/filters/bw/infraredfilter.cpp:   
> BlurFilter(this, BWImage, BWBlurImage, 10, 20, blurRadius);

I cannot find this one. It was a tool its own reachable from the menu. Now it
is only part of the B/W tool, right?
No changes are needed as the images compare identical with and without the
patch (I tried a couple of IR films).


> Filter Manager for versionning feature : This much by patched to be
> compatible, especially if filter argumer change. There is a version ID in
> BlurFilter implementation dedicated for that :
> ./libs/dimg/filters/dimgfiltermanager.cpp:            << ImgFilterPtr(new
> BasicDImgFilterGenerator<BlurFilter>())
> ./libs/dimg/filters/dimgfiltermanager.cpp:   
> filterIcons.insert("digikam:BlurFilter",           "blurimage");

Uhmm... I don't know what do do here.


> BlurFx filter :
> 
> ./libs/dimg/filters/fx/blurfxfilter.cpp:        BlurFilter(this, *orgImage,
> *destImage, 10, 75, BlurRadius);
> ./libs/dimg/filters/fx/blurfxfilter.cpp:        BlurFilter(this, *orgImage,
> *destImage, 10, 80, BlurRadius);

As above, no changes are needed: since the radius is an integer value the
result is identical to the old filter.


> Charcoal Filter :
> 
> ./libs/dimg/filters/fx/charcoalfilter.cpp:    BlurFilter(this, m_destImage,
> m_destImage, 80, 85, (int)(d->smooth / 10.0));

Fixed.


> Versionning test code :
> 
> ./tests/abstractdimagehistorytest.cpp:    BlurFilter
> filter(iface.original(), this);

Looks ok as-is, but I'm not sure.


> BQM Watermark tool :
> 
> ./utilities/queuemanager/basetools/decorate/watermark.cpp:        BlurFilter
> blur(&backgroundLayer, 0L, radius);
> 
> BQM Blur Tool :
> 
> ./utilities/queuemanager/basetools/enhance/blur.cpp:    BlurFilter
> blur(&image(), 0L, radius);
> 
> Editor Red Eyes removal tool :
> 
> ./imageplugins/enhance/redeyetool.cpp:    BlurFilter blur(&mask2, 0L,
> d->smoothLevel->value());
> 
> Editor Blur tool :
> 
> ./imageplugins/enhance/blurtool.cpp:    setFilter(new BlurFilter(&img, this,
> d->radiusInput->value()));
> ./imageplugins/enhance/blurtool.cpp:    setFilter(new
> BlurFilter(iface.original(), this, d->radiusInput->value()));

No changes are needed for those tools.


> This grep is done on code from KF5 frameworks branch but this must be very
> similar on KDE4 code (git/master branch)

I attached another patch. It's against digikam-4.7.0.

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Digikam-devel mailing list