Re: [Gimp-developer] Displaying linear gamma images
- From: Jon Nordby <jononor gmail com>
- To: Elle Stone <l elle stone gmail com>
- Cc: Michael Natterer <mitch gimp org>, Gimp-developer <gimp-developer-list gnome org>
- Subject: Re: [Gimp-developer] Displaying linear gamma images
- Date: Thu, 12 Sep 2013 18:12:38 +0200
On 12 September 2013 16:08, Elle Stone <l elle stone gmail com> wrote:
I've made progress getting a linear gamma image to display without
posterization in the shadows. I put up a temporary web page with the
modified code and a picture:
http://ninedegreesbelow.com/temp/convert-buffer-before-cairo.html
The problem at this point is that the image won't display properly
until something like doing a very small levels correction forces a
screen redraw. After forcing a screen redraw, the image is displayed
without any posterization, but with magenta lines (outlining the
tiles?). The screen redraw lasts until the level dialog is closed.
I think the problem is that I'm not properly merging and updating
"buffer" after the hard-coded transform. The corresponding code from
the lcms.c file uses layer buffers, which seems not applicable to a
projection:
gimp_drawable_merge_shadow (layer_id, TRUE);
gimp_drawable_update (layer_id, 0, 0, layer_width, layer_height);
I do not know the GimpDisplayShell code well, but try to just read out
data from the projection GeglBuffer instead of modifying it. And
instead of the the "gegl_buffer_get (buffer, ... "cairo-ARGB32", ...
data ...)" that you have marked, do the lcms transform such that the
8bit ready-for-display ends up in the "data" buffer.
Also, can you please post your changes as a (git formatted) diff?
It is much easier to read and apply for another contributor trying to
help you out.
--
Jon Nordby - www.jonnor.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]