#include "MagickCore/blob-private.h"
#include "MagickCore/color.h"
#include "MagickCore/color-private.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/draw.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
image=DestroyImage(image);
return((Image *) NULL);
}
+ if (IssRGBColorspace(start_color.colorspace) != MagickFalse)
+ {
+ start_color.red=QuantumRange*DecompandsRGB(QuantumScale*
+ start_color.red);
+ start_color.green=QuantumRange*DecompandsRGB(QuantumScale*
+ start_color.green);
+ start_color.blue=QuantumRange*DecompandsRGB(QuantumScale*
+ start_color.blue);
+ }
+ if (IssRGBColorspace(stop_color.colorspace) != MagickFalse)
+ {
+ stop_color.red=QuantumRange*DecompandsRGB(QuantumScale*
+ stop_color.red);
+ stop_color.green=QuantumRange*DecompandsRGB(QuantumScale*
+ stop_color.green);
+ stop_color.blue=QuantumRange*DecompandsRGB(QuantumScale*
+ stop_color.blue);
+ }
status=GradientImage(image,LocaleCompare(image_info->magick,"GRADIENT") == 0 ?
LinearGradient : RadialGradient,PadSpread,&start_color,&stop_color,
exception);
image=DestroyImageList(image);
return((Image *) NULL);
}
- if (IssRGBColorspace(image->colorspace) != MagickFalse)
- (void) SetImageColorspace(image,RGBColorspace,exception);
+ (void) SetImageColorspace(image,start_color.colorspace,exception);
+ if ((start_color.matte == MagickFalse) && (stop_color.matte == MagickFalse))
+ (void) SetImageAlphaChannel(image,DeactivateAlphaChannel,exception);
+ if (IssRGBColorspace(start_color.colorspace) != MagickFalse)
+ {
+ (void) SetImageColorspace(image,RGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ }
return(GetFirstImageInList(image));
}
\f