Commit 94c6bb46 authored by Michael Natterer's avatar Michael Natterer 😴

Bug 783755 - Smudge should blend the smudged colors using linear RGB

Looked a bit deeper into heal: while I didn't try to understand what
it's actually doing, this is strange: there is a comment that says
that healing should done in perceptual space, and the code uses
R'G'B'A float (at least it completely did before the last commit).

On the other hand, the code adds and subtracts temporary buffers,
which screams "gamma artifacts" unless done in linear space.

This commit changes everything to use linear float buffers,
and removes the comment. It "looks" right to me now, please test.
parent 17596fb1
......@@ -196,9 +196,9 @@ gimp_heal_sub (GeglBuffer *top_buffer,
gint n_components = babl_format_get_n_components (format);
if (n_components == 2)
format = babl_format ("Y'A float");
format = babl_format ("YA float");
else if (n_components == 4)
format = babl_format ("R'G'B'A float");
format = babl_format ("RGBA float");
else
g_return_if_reached ();
......@@ -239,9 +239,9 @@ gimp_heal_add (GeglBuffer *first_buffer,
gint n_components = babl_format_get_n_components (format);
if (n_components == 2)
format = babl_format ("Y'A float");
format = babl_format ("YA float");
else if (n_components == 4)
format = babl_format ("R'G'B'A float");
format = babl_format ("RGBA float");
else
g_return_if_reached ();
......@@ -552,11 +552,10 @@ gimp_heal_motion (GimpSourceCore *source_core,
return;
}
/* heal should work in perceptual space, use R'G'B' instead of RGB */
src_copy = gegl_buffer_new (GEGL_RECTANGLE (0, 0,
src_rect->width,
src_rect->height),
babl_format ("R'G'B'A float"));
babl_format ("RGBA float"));
gegl_buffer_copy (src_buffer, src_rect, GEGL_ABYSS_NONE,
src_copy,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment