Commit c32685e9 authored by Tor Lillqvist's avatar Tor Lillqvist
Browse files

Oops. Actually use the rgb_to_l function from previous commit. This should

speed up the color balance operation a bit.
parent 51b9bd70
Mon Feb 15 05:23:18 1999 Tor Lillqvist <tml@iki.fi>
* app/color_balance.c (color_balance): Use the rgb_to_l function.
Sun Feb 14 22:16:16 1999 Tor Lillqvist <tml@iki.fi>
* app/paint_funcs.c app/paint_funcs.h : New function rgb_to_l for
......
......@@ -152,9 +152,8 @@ color_balance (PixelRegion *srcPR,
if (cbd->preserve_luminosity)
{
rgb_to_hls (&r, &g, &b);
rgb_to_hls (&r_n, &g_n, &b_n);
g_n = g;
g_n = rgb_to_l (r, g, b);
hls_to_rgb (&r_n, &g_n, &b_n);
}
......
......@@ -152,9 +152,8 @@ color_balance (PixelRegion *srcPR,
if (cbd->preserve_luminosity)
{
rgb_to_hls (&r, &g, &b);
rgb_to_hls (&r_n, &g_n, &b_n);
g_n = g;
g_n = rgb_to_l (r, g, b);
hls_to_rgb (&r_n, &g_n, &b_n);
}
......
......@@ -152,9 +152,8 @@ color_balance (PixelRegion *srcPR,
if (cbd->preserve_luminosity)
{
rgb_to_hls (&r, &g, &b);
rgb_to_hls (&r_n, &g_n, &b_n);
g_n = g;
g_n = rgb_to_l (r, g, b);
hls_to_rgb (&r_n, &g_n, &b_n);
}
......
......@@ -152,9 +152,8 @@ color_balance (PixelRegion *srcPR,
if (cbd->preserve_luminosity)
{
rgb_to_hls (&r, &g, &b);
rgb_to_hls (&r_n, &g_n, &b_n);
g_n = g;
g_n = rgb_to_l (r, g, b);
hls_to_rgb (&r_n, &g_n, &b_n);
}
......
Supports Markdown
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