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

Gilles Caulier caulier.gilles at gmail.com
Tue Jan 20 08:35:52 GMT 2015


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

--- Comment #9 from Gilles Caulier <caulier.gilles at gmail.com> ---
> 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" .

==> output filtered :

UnsharpedMask filter : ./libs/dimg/filters/sharp/unsharpmaskfilter.cpp:   
BlurFilter(this, m_orgImage, m_destImage, 0, 10, (int)(m_radius*10.0));
Infrared filter : ./libs/dimg/filters/bw/infraredfilter.cpp:   
BlurFilter(this, BWImage, BWBlurImage, 10, 20, blurRadius);

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");

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);

Charcoal Filter :

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

Versionning test code :

./tests/abstractdimagehistorytest.cpp:    BlurFilter filter(iface.original(),
this);

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()));

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

VoilĂ 

Gilles Caulier

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


More information about the Digikam-devel mailing list