Help! Linear color space not working?

Don’t assign the linear gamma sRGB profile to a regular sRGB image. Convert from regular to linear sRGB. Make sure image is at >=16-bit precision and referably 32f.

Did you download the tutorial image? If so, why? Try making a new linear gamma sRGB image using CCE and painting. Then make a regular sRGB image and paint similar strokes. Compare.

Wow thanks for converting trick. I found that only way is: create or open a image in cce, without assign profile, then convert the built-in sRGB to sRGB-elle-v4-g10, then linear space works well. If I create a new image with sRGB-elle-v4-g10, it got weird colorful halo. and in gimp std it just wont work at all, either way.

edit:
Following your specifing profile&converting I blind guess some profiles in kirta folder. Turns out gimp std can also work well in linear space if I convert build-in sRGB to rec2020-elle-v4-g10 or CIERGB-elle-v4-g10, at least dark edges (almost)gone. It just won’t work with sRGB-elle-v4-g10. Thanks a lot

I can’t replicate this. What is your step-by-step procedure?

It shouldn’t work with default GIMP, at all, unless/until you trigger the making of an internal profile, but this process sometimes fails to work. With default GIMP you are better off only opening regular sRGB images and only using the built-in sRGB profile when making a new image.

Don’t do this. Just use the built-in sRGB profile with default GIMP. Otherwise you’ll run into issues with hard-coded sRGB primaries, even if GIMP is handling the TRC correctly.

My steps:
1.open gimp cce 64bit for window
2.create new image, space=rgb, precision=32 bit fp, profile=sRGB-elle-V4-g10.icc, click ok
3. fill a bg color, like red
4. paint with another color, got weird halo, like this:

My steps getting correct results:
when creating image, left profile blank
after created, menu image–color manage–convert profile to sRGB-elle-V4-g10.icc, as u suggested
like this:

yes I read about you specifically point out about hard coded sRGB thing, I indeed see some subtle but colorful halo with rec2020 or CIERGB. I just desperatly guess they are anyway better than sRGB profile :-//

You mean I just give up tring to use default gimp for linear space work? Bad news:-(( I will stick to cce then

@lancertaki the JPEG compression artifacts in your images are quite horrible to look at and somewhat obscure the problem. Could you increase the compression quality?

I tried using GIMP 2.9.4 (commit 60e9405):

  • RGB, 32-bit linear floating point, GIMP built-in Linear sRGB
  • RGB, 32-bit gamma floating point, GIMP built-in sRGB

I get this:

Perhaps there is an error in your procedure that you are overlooking? or perhaps in the Window’s build - @partha ? .

Painting using Normal blend is not affected by the sRGB primaries. LCH is affected, but most blend modes are not. Also, when you paint fully saturated Rec2020 colors, all you are seeing is the most saturated colors your monitor can display. So unless you are using a Rec2020 monitor, what you see is highly misleading.

@Morgan_Hardwood - good call. @lancertaki - are you saving linear gamma images as jpegs? Jpeg compression assumes perceptually uniform encoding.

Since 2.9.4, default GIMP has changed a lot. The old tutorials apply to 2.9.4, but not to @partha 's latest build. Maybe @partha can explain how to get linear blending from his latest build. Or maybe @lancertaki can download and use a 2.9.4 build and follow the tutorials.

Current default GIMP is even more different from 2.9.4 than Partha’s latest build. It’s getting close to being more intuitive to use, but still has some remaining rough edges. I can explain how to set up current GIMP for linear painting/blending, but @lancertaki isn’t using latest default GIMP.

@lancertaki mentioned Krita. CCE handles RGB color management more or less like Krita, and I’m completely clueless as to how/why @lancertaki is producing/getting odd results with CCE.

I tried cce again, now both assigning icc when creating and converting icc get correct results, I must did sth wrong in former test, sorry for that.

btw I didn’t use “export” or “save as”. I use a screenshot software, that’s supposed to capture what I see I guess?

Hi Morgan_hardwood. Do u use std or cce?. My gimp std is garantee NOT behaving correctly :-/ and I found a very very weird thing in gimp std 0c9d76d. here’s linear sRGB I got:


definitly not good.
now the weird thing: I create a regular sRGB image, but forcefully convert to a linear icc sRGB-elle-v4-g10.icc, now it, I’d say, looks like correct


I don know if I’m allowed set a icc profile except for built-in one to gimp std, Elle told me it’s hard coded with sRGB. I guess the icc I used is a sRGB profile? really no idea,

Thankfully I got cce to stick to so not big deal. And I’m doing game textures for window games so can’t try linux latest gimp version. hope partha will give us newer windows gimp to try later (Thank him a lot)

Standard.

@lancertaki the important thing if you found a bug is to report it to the GIMP devs:

funny is I don know if it’s a bug. I read Elle’s articles again, and wildly guess maybe gimp std is now doing similiar to gimp cce? which means user just forget about switching between regular and linear rgb, let gimp stay in sRGB, all they need is assign a icc profile? Just guess. I will do some more test like blur and layer blend, to see if it just look like correct or really correct

And I’m quite sure that my gimp is relatively old (download in Feb.27), don know how current gimp behaves.

@lancertaki you don’t have to be 100% certain to report a bug. Open a bug report, clearly describe the steps to reproduce and the version of GIMP std you reproduced it on (the commit hash which you get from Help > About), and let them decide whether it’s a bug or not.

Sure will do

Hi @lancertaki,

With latest default GIMP on Linux, I can’t replicate what you show:

In Partha’s last build, the relevant code is very different. Everything has changed recently, so instead of filing a bug report now, it might be good to wait for the next build.

Actually in latest default GIMP it’s easy to produce what you get, but it’s done via a user choice in the UI: To get gamma artifacts while painting, deliberately choose Legacy blend mode for the brush, instead of using Default blend mode.

In default GIMP as of yesterday’s code, it’s best to only paint in the GIMP built-in sRGB color space.

Default GIMP doesn’t handle color management like CCE. Rather default GIMP separates the profile TRC from the profile Primaries. Currently TRC and Primaries are both hard-coded to sRGB, but eventually this will change.

Since the latest default GIMP code changes (not in Partha’s latest build), increasingly if I’m editing an sRGB image, many times I’ll use default GIMP instead of CCE, precisely to avoid avoid having to make profile conversions between regular sRGB and linear gamma sRGB.

Yea nice to see gimp actually behaves well, I think I can get a sweet latest version sooner or later.
My gimp std has no difference switching brush’s blend mode to legacy or not, maybe it proves my version is out of date?

Here’s the practical question: I did my stupid steps with my gimp std, and got a so-called correct linear work, now I tried the images in game engine. my exporting method is copy visible to a new built-in sRGB image then export a regular tga. I’d say it works at least visually great, I even think it IS the right linear work. image below shows them, gimp std default work(left), and my weird steps work(right)

and lots of my work is about grayscale images ONLY, I can safely edit them in default gimp build-in sRGB right?

Yea my weird steps can make images look like correct linear, in gimp. but after I export it, it can only be displayed correctly in softwares capable of reading embed icc profile, like XnView. In game engine it tragically turn back to dark edges. If I convert to built-in sRGB profile before exporting, the image turn back to dark edges immediately, so I figured out the “copy visible to new image” way, again, not sure if it’s technically right :-//

oh sorry for one more question: is krita’s LSY color mode similiar to gimp’s LCH? I guess the y means y in xyz ref space

The commit id from help shows that your version of 2.9 is not current with default GIMP 2.9 git master.

As you seem to be pretty good at sleuthing out issues, and you understand the difference between linear gamma and perceptually uniform RGB, it might be nice if you figure out how to build GIMP from git on Windows. This way you’d always have access to the latest code, and could help debug issues in the current code. @partha 's website has build instructions for Windows.

Yes, that looks correct. Problems you might (or might not) encounter include file-format-specific export issues and issues with internal TRC changes sometimes getting out of sync.

Grayscale also is subject to gamma issues, the classic case being drawing a gray gradient. See the first image on this page:

You are working with gaming which afaik tries to emulate behavior of real light, and real light falls off linearly, so you probably don’t want gamma artifacts in your grayscale images.

Whatever works. You could ask on IRC (irc://irc.gimp.org/gimp) or on the gimp dev mailing list (GIMP - Discuss). But the first question you are likely to get is “Which commit number and which OS?” followed by “Can you update to the latest code and see if the problem is still there?”

No, they are not the same. See HSL and HSV - Wikipedia, and also read the rest of the article, esp. the section on disadvantages.

It means Y (luminance) from XYZ, or luma/Y’ if the color space is not encoded linearly. xyz is not the same as XYZ - the case matters. “z” in xyz = 1 - (x + y).

If you are curious, equations for converting between xyY , XYZ, LAB, and LCH are here - click on the “math” link: http://brucelindbloom.com/

1 Like

Hi very thanks for your time.
sorry I misspelled, I mean krita has HSY mode, not HSL, or HSV or HSI. Seem like the term Luma on wiki page. From krita doc they claimed it’s much better than other, giving user “true luminosity” but intuitively bind to color–sounds like RGB luminosity in gime cce. I’ll do more test, hoping krita can be a useful backup, partially.

If you do want to get an updated GIMP, I wrote up build instructions for Windows that shouldn’t be too hard:

https://wiki.gimp.org/wiki/Hacking:Building/Windows

Feel free to start another post if you get hung up.

That’s a bit challenging for me because I may have problem accessing github. But I’m finding a guide like this for a long time(removed from partha’s website links), thanks a lot