Diffusion Krita db99478fed1e

Add gradient map filter, Filter>Map>Gradient Map

Authored by sbrown on Feb 9 2016, 2:08 AM.

Description

Add gradient map filter, Filter>Map>Gradient Map

Details

Committed
sbrownFeb 9 2016, 2:08 AM
Parents
R37:d53d24f65d4d: update readme with common issues while building windows
Branches
Unknown
Tags
Unknown
woltherav added a subscriber: woltherav.EditedFeb 10 2016, 11:07 PM

slangkamp mentioned that the color transform isn't threadsafe...

I am wondering though, why are you memcpy-ing?

https://phabricator.kde.org/diffusion/KRITA/browse/master/plugins/filters/normalize/kis_normalize.cpp
https://phabricator.kde.org/diffusion/KRITA/browse/master/plugins/filters/posterize/posterize.cpp

posterize doesn't use memcpy there. And you seem to miss a fromLabA16 as well.

You can just use something like

m_colorSpace->fromLabA16(reinterpret_cast<quint8 *>(outColor), dst, 1);

maybe? then you can make the filter color space independant as well(as it would do conversion)

Just to give a proof of the thread safety issue: https://paste.kde.org/plhijhyhc
I was "quickly" selecting different gradients.