After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 608265 - [BABL] Gimp COLOR blending mode crashes in GEGL
[BABL] Gimp COLOR blending mode crashes in GEGL
Status: RESOLVED FIXED
Product: GEGL
Classification: Other
Component: operations
unspecified
Other Windows
: Normal normal
: ---
Assigned To: Default Gegl Component Owner
Default Gegl Component Owner
Depends on:
Blocks:
 
 
Reported: 2010-01-27 16:31 UTC by bartosz.styperek
Modified: 2014-02-17 02:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample image with blac&white gradient and color layer (662.39 KB, application/octet-stream)
2010-01-27 16:31 UTC, bartosz.styperek
Details

Description bartosz.styperek 2010-01-27 16:31:13 UTC
Created attachment 152421 [details]
Sample image with blac&white gradient and color layer

My observations are based on this thread on concept art:
http://conceptart.org/forums/showthread.php?t=17837
As your can see colors have representation in different value (color~value):
yellow - light gray
purple - almost black
So if I paint in black and white, and the I add layer with color blending mode I expect that:
-my light gray become yellow if i paint yellow stroke on my color layer
-my dark gray become purple.

Now what is wrong:
To show how it should work (from Photoshop):http://i47.tinypic.com/33xipu8.jpg - this img has 2 layers -normal with b&w gradient + layer above set to Color mode with painted colored stripes.
you can see that if i paint yellow stroke on my Color layer - it's most saturated where light gray was; purple is most saturated where dark gray was etc.

This is how it works in gimp 2.6.7 and 2.7: http://i47.tinypic.com/2589ez5.jpg
you can see it is always most saturated  in the middle; in result color!=value what is wrong. 

To sum up, in color theory color = value, but for Gimp (including 2.7 and below) it's not so true.
P. S.
Here is link i found on wiki about blending modes math:
http://www.nathanm.com/photoshop-blending-math/
Srry for bad english
Comment 1 Martin Nordholts 2010-01-27 17:46:33 UTC
The Color mode in the legacy core uses low-quality and inaccurate algorithms. Do you get the expected result if you use GEGL? I have improved the preceptive quality of the Color-family of layer modes when using GEGL. Use git master of both GEGL and GIMP.

Thanks for the bug report!
Comment 2 bartosz.styperek 2010-01-27 19:16:25 UTC
(In reply to comment #1)
> The Color mode in the legacy core uses low-quality and inaccurate algorithms.
> Do you get the expected result if you use GEGL? I have improved the preceptive
> quality of the Color-family of layer modes when using GEGL. Use git master of
> both GEGL and GIMP.
> 
> Thanks for the bug report!

When i switch to GEGL gimp crashes:
babl-format.c:492 babl_format()
babl_format("CIE LCH(ab) float"): not found
The system cannot find the patch specified

I got gimp 2.7 from here:
http://sourceforge.net/projects/gimp-win/files/GIMP%20%2B%20GTK%2B%20(development%20rel.)/
Comment 3 Michael Schumacher 2012-05-27 21:30:30 UTC
It's time to recheck this with 2.8.0.
Comment 4 bartosz.styperek 2012-05-28 10:25:57 UTC
in 2.8 if I enable 'use gegl' overlay blending mode works ok,
but if I change blending mode to color and I have 'use gegl' enabled it crashes every time.
Comment 5 Massimo 2012-05-28 15:43:39 UTC
The crash is a problem in babl. Babl hardwrites its extensions directory
name at compile time based on LIBDIR.

http://git.gnome.org/browse/babl/tree/babl/babl.c#n24

If that path does not correspond to the directory effectively containing
Babl extensions, it is possible to set the env var BABL_PATH to the
right directory (to avoid problems with spaces in path names, I found
that on Windows it works using Unix directory separator '/')
    
For example with my default installation I have to type in a DOS prompt:

set BABL_PATH=/Program Files/GIMP 2/lib/babl-0.1
"%ProgramFiles%\GIMP 2\bin\gimp-2.8"

to be able to run GIMP and use 'Color' layer mode with View->'Use GEGL' checked,
otherwise I experience the same crash.
Comment 6 Max Mustermann 2012-10-01 17:55:03 UTC
I couldn't reproduce it with GIMP 2.8.2 neither on Windows nor on Mac, because the 'Use GEGL' option was removed in GIMP 2.8.2.
Due to comment #5 moving the bug to product 'GEGL' and marking with [BABL] tag.
Comment 7 Mike Henning (drawoc) 2013-03-31 20:00:20 UTC
The babl bug massimo described was fixed in bug 688217.

I tried the attached file in gimp 2.9, and it doesn't seem to have changed at all from the screenshots of the gimp in the description.
Comment 8 Daniel Sabo 2014-02-10 18:52:05 UTC
Is there something that still needs to be done here?
Comment 9 Michael Natterer 2014-02-16 21:01:05 UTC
I don't think so.