From: Tony Cook Date: Mon, 10 Sep 2001 07:25:01 +0000 (+0000) Subject: mis-handling for hues X-Git-Tag: Imager-0.48^2~580 X-Git-Url: http://git.imager.perl.org/imager.git/commitdiff_plain/976efad5a3792a4c90ff2b2b196894b20c189190 mis-handling for hues --- diff --git a/fills.c b/fills.c index e7d3bc49..06cbeb0a 100644 --- a/fills.c +++ b/fills.c @@ -109,14 +109,18 @@ static i_color fcolor_to_color(i_fcolor *c) { for (ch = 0; ch < MAXCHANNELS; ++ch) out.channel[ch] = SampleFTo8(c->channel[ch]); + + return out; } static i_fcolor color_to_fcolor(i_color *c) { int ch; - i_color out; + i_fcolor out; for (ch = 0; ch < MAXCHANNELS; ++ch) out.channel[ch] = Sample8ToF(c->channel[ch]); + + return out; } /* alpha combine in with out */ @@ -1007,6 +1011,7 @@ static void combine_hue(i_color *out, i_color *in, int channels, int count) { i_rgb_to_hsv(in); c.channel[0] = in->channel[0]; i_hsv_to_rgb(&c); + c.channel[3] = in->channel[3]; COMBINE(*out, c, channels); ++out; ++in;