]> git.imager.perl.org - imager.git/commitdiff
mis-handling for hues
authorTony Cook <tony@develop=help.com>
Mon, 10 Sep 2001 07:25:01 +0000 (07:25 +0000)
committerTony Cook <tony@develop=help.com>
Mon, 10 Sep 2001 07:25:01 +0000 (07:25 +0000)
fills.c

diff --git a/fills.c b/fills.c
index e7d3bc49c5b6b3573e2b681b657291fa37b60162..06cbeb0a5666727aed2498aa1699e6d4ca4f5cb4 100644 (file)
--- 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;