Created attachment 109864 [details]
[Test file: a PNG with a character painted with greyscale]
I have issue with the Gradient map filter being not really WYSIWYG in my tests.
1. Open the test file in attachment: Spring-greyscale-painting.png
2. Open the filter: Filter > Map > Gradient Map
3. Pick a gradient in the presets (eg: GPS Fire Blueish)
The color of the gradient doesn't map to the picture only a low percent of the gradient are mapped to the full artwork.
Reproduced on compiled source, appimage4.0beta1 ; but Wolthera couldn't reproduce (IRC discution).
I can reproduce it on the appimage, but not my local build, which makes it near impossible for me to figure out what is going on...
Created attachment 109927 [details]
Hm, I get a completely different result from Deevad; but the same result both with the beta 1 appimage and my master build
FYI I have the same issue as David. The gradient seems to map only between the gradient stops corresponding to the two lightest values.
- only the green to red part of the spectrum is mapped
- blue to green part of the spectrum is ignored
1. Create a white to black spectrum
2. Add a gradient map filter with at least 3 stops
Created attachment 112837 [details]
[^ screenshot of the bug: Krita 4.0.3appimage ]
Thanks for poking this bug-report.
I could easily reproduce it with Krita 4.0.3 appimage and with Krita~master (git a0899ca) on Linux using the same PNG as in the first post of this thread. (see screenshot in attachment). The default rainbow gradient is a good gradient to test this.
I still can confirm this bug in Git~master of today.
Gradient with only two color markers will work:
If a third color or more is introduced, this new colors will be ignored:
The two markers on right of the gradient are the only color affecting the gradient applied on canvas.
Created attachment 113498 [details]
testing gradient map with 3 stops
I could not reproduce this bug, neither in master nor in 4.0.4 on the Mac builds.
I tested in many color spaces and bit depths and the resulting gradient map image is shown correctly.
Like David I am also working on Linux. I am using the appimage of Krita 4.0.0.
Seems that this bug is specific to Linux.
I wonder if it is not a bug related to a bug in Little CMS; I'm using:
> Found lcms version 2.08, /usr/lib/x86_64-linux-gnu/liblcms2.so
I'll try to build a newer version of liblcms, and rebuild Krita after that.
So, there's something weird going on with the serialisation of the gradient into xml.
What that means is that on my system, it does always store the offsets properly, but they seem to get lost on deevad's system.
Version: 4.2.0-pre-alpha (git cb3736e)
Build ABI: x86_64-little_endian-lp64
Build CPU: x86_64
Kernel Type: linux
Kernel Version: 4.13.0-45-generic
Pretty Productname: Ubuntu 17.10
Product Type: ubuntu
Product Version: 17.10
Could it be a localisation issue? Deevad, is your system set to French?
@boud: good idea. I have a mix; English lang, but French time/numeric/monetary...
Could it be a problem of numeric? French write them 0,5 instead of 0.5; maybe this could lead the XML of the filter to reset all the offset to 0 if it tries to write them in respect to my locale, with comma...
Created attachment 113608 [details]
[^ screenshot of the bug solved (workaround) with new locales]
@boud: 👍 big thumb up! It is a local issue with numeric and XML as Wolthera_laptop thought. It is now working after switching my numeric to US. (proof in attachement). There is certainly a bad comma/dot conversion somewhere.
Git commit 0bb8b52570f54bd0a1b11d9309713edb0838d05f by Boudewijn Rempt.
Committed on 02/05/2019 at 10:22.
Pushed by rempt into branch 'master'.
Use KisDomUtils to read and write floats in gradients
M +15 -14 libs/pigment/resources/KoSegmentGradient.cpp
M +7 -5 libs/pigment/resources/KoStopGradient.cpp
Thank you very much Boys!
(autocorrect issue on smartphone 's keyboard, sorry)