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

Gilles Caulier caulier.gilles at gmail.com
Sat Feb 14 14:34:52 GMT 2015


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

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

yes it it

>>No changes are needed as the images compare identical with and without the patch (I tried a couple of IR films).

ok

> 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.

Nothing special 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.

ok.

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

>>Fixed.

ok

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

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

ok

> 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.

ok

I think you forgot somthing important in your patch : Blur filter settings
version ID with compatibility with older version. It's for versionning feature.

This ID are registered in this header :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/libs/dimg/filters/fx/blurfilter.h#L62

Both methods :

CurrentVersion()
SupportedVersions()

return respectively the version ID of filter (with the current settings
supported), and the list of version where current settings still compatible.

As you have changed settings, ID must be updated and supported version ID
patched.

Gilles Caulier

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



More information about the Digikam-devel mailing list