Skip to content

Commit

Permalink
[cximage] Fix uninitialized struct member in ximadsp.
Browse files Browse the repository at this point in the history
  • Loading branch information
ace20022 committed Sep 26, 2013
1 parent ea20790 commit 75ad4ab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/cximage-6.0/CxImage/ximadsp.cpp
Expand Up @@ -654,6 +654,7 @@ bool CxImage::Colorize(BYTE hue, BYTE sat, float blend)
hsl.rgbRed=hue;
hsl.rgbGreen=sat;
hsl.rgbBlue = (BYTE)RGB2GRAY(color.rgbRed,color.rgbGreen,color.rgbBlue);
hsl.rgbReserved = (BYTE)0;
hsl = HSLtoRGB(hsl);
//BlendPixelColor(x,y,hsl,blend);
//color.rgbRed = (BYTE)(hsl.rgbRed * blend + color.rgbRed * (1.0f - blend));
Expand All @@ -679,6 +680,7 @@ bool CxImage::Colorize(BYTE hue, BYTE sat, float blend)
hsl.rgbRed=hue;
hsl.rgbGreen=sat;
hsl.rgbBlue = (BYTE)RGB2GRAY(color.rgbRed,color.rgbGreen,color.rgbBlue);
hsl.rgbReserved = (BYTE)0;
hsl = HSLtoRGB(hsl);
color.rgbRed = (BYTE)(hsl.rgbRed * blend + color.rgbRed * (1.0f - blend));
color.rgbBlue = (BYTE)(hsl.rgbBlue * blend + color.rgbBlue * (1.0f - blend));
Expand Down Expand Up @@ -1802,6 +1804,7 @@ bool CxImage::Combine(CxImage* r,CxImage* g,CxImage* b,CxImage* a, long colorspa
c.rgbRed=r->GetPixelIndex(x,y);
c.rgbGreen=g->GetPixelIndex(x,y);
c.rgbBlue=b->GetPixelIndex(x,y);
c.rgbReserved = (BYTE)0;
switch (colorspace){
case 1:
BlindSetPixelColor(x,y,HSLtoRGB(c));
Expand Down

0 comments on commit 75ad4ab

Please sign in to comment.