if ((image->background_color.matte != MagickFalse) &&
(image->matte == MagickFalse))
(void) SetCacheAlphaChannel(image,OpaqueAlpha,exception);
+ if ((IsPixelInfoGray(&image->background_color) == MagickFalse) &&
+ (IsGrayColorspace(image->colorspace) != MagickFalse))
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
break;
}
case TransparentVirtualPixelMethod:
distort_image=DestroyImage(distort_image);
return((Image *) NULL);
}
- distort_image->page.x=geometry.x;
- distort_image->page.y=geometry.y;
+ if ((IsPixelInfoGray(&distort_image->background_color) == MagickFalse) &&
+ (IsGrayColorspace(distort_image->colorspace) != MagickFalse))
+ (void) TransformImageColorspace(distort_image,sRGBColorspace,exception);
if (distort_image->background_color.matte != MagickFalse)
distort_image->matte=MagickTrue;
+ distort_image->page.x=geometry.x;
+ distort_image->page.y=geometry.y;
{ /* ----- MAIN CODE -----
Sample the source image to each pixel in the distort image.
distort_image=CloneImage(image,0,0,MagickTrue,exception);
if (distort_image == (Image *) NULL)
return((Image *) NULL);
- if (IsGrayColorspace(image->colorspace) != MagickFalse)
- (void) TransformImageColorspace(distort_image,sRGBColorspace,exception);
(void) SetImageVirtualPixelMethod(distort_image,BackgroundVirtualPixelMethod,
exception);
rotate_image=DistortImage(distort_image,ScaleRotateTranslateDistortion,1,
assert(image->signature == MagickSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
- if (IsGrayColorspace(image->colorspace) != MagickFalse)
- (void) SetImageColorspace(image,sRGBColorspace,exception);
if (image->storage_class == PseudoClass)
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp parallel for schedule(static,4) shared(progress,status) \