Bug 392252 - gradient map doesnt support linear color space
Summary: gradient map doesnt support linear color space
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Filters (show other bugs)
Version: 4.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on: 343864
Blocks:
  Show dependency treegraph
 
Reported: 2018-03-24 02:26 UTC by Bronson
Modified: 2021-02-19 16:46 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
linear space before on left, gradient map applied on right (206.98 KB, image/jpeg)
2018-03-24 02:26 UTC, Bronson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bronson 2018-03-24 02:26:24 UTC
Created attachment 111587 [details]
linear space before on left, gradient map applied on right

Hi Guys,

I have a serious show stopper bug for a project we are working on (hence marked major). So wondering if there is anyway our programmer can help fix this issue?

So the issue is that the filter > map > gradient map does NOT support linear color space.

We are working with 32-bit linear space terrain heightmap data and need linear space to work.

Ive attached a screenshot of the problem.
1. We have a linear space height map - black to white normalised
2. I apply a gradient map using kritas gradient map, black and white. And it throws the colors in the heightmap all out of alignment.

When i check the xml output of the gradient map I notice this line:
space="sRGB-elle-V2-srgbtrc.icc" which ive tried changing, but it doesnt work.
Comment 1 Bronson 2018-03-24 08:18:17 UTC
Right Ive found a work around, after looking through the krita code...

Open krita settings > color management > display > screen 1: change to sRGB-elle-V2-g10.icc
Rendering intent Absolute colorimetic!

So this leaves a few questions:
Should I would expect a gradient map to default to linear space? 
Is it worth adding an color profile option to the gradient map dialog?
Comment 2 wolthera 2018-03-24 14:10:01 UTC
What is going on is that the gradient map filter serializes to srgb before sending to the filter. It's gonna take a while to figure out how to handle this.

You can edit the profile in the xml data in the initial filter setups dialog, but really, even when that is done, the fact remains our gradients are limited to 8bit, which cannot be resolved in a few days, and despite it having been a candidate stretch goal for several kickstarters it just never got picked.

You are for now better off either writing a python script(that interprets the pixeldata byte arrays and then adjusts them appropriately) or using a different program for this part of your project.
Comment 3 Bronson 2019-08-22 11:29:48 UTC
Ive also noticed the gradient tool doesnt look to actually support a smooth 16/32bit gradient. It looks like it is limited to 8 bit.
Comment 4 Halla Rempt 2019-08-22 11:43:20 UTC
Yes, that is correct.
Comment 5 Halla Rempt 2021-02-19 15:43:21 UTC
This is fixed in the master branch after merging Amyspark's gradient patches.