From: cristy Date: Sun, 21 Apr 2013 15:22:02 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~3829 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c81d063030f7b30a97c7856e95534243cdc9e13;p=imagemagick --- diff --git a/MagickCore/annotate.c b/MagickCore/annotate.c index 04434cd26..238d9211a 100644 --- a/MagickCore/annotate.c +++ b/MagickCore/annotate.c @@ -291,7 +291,7 @@ MagickExport MagickBooleanType AnnotateImage(Image *image, if (SetImageStorageClass(image,DirectClass,exception) == MagickFalse) return(MagickFalse); if (IsGrayColorspace(image->colorspace) != MagickFalse) - (void) TransformImageColorspace(image,sRGBColorspace,exception); + (void) SetImageColorspace(image,sRGBColorspace,exception); status=MagickTrue; for (i=0; textlist[i] != (char *) NULL; i++) { diff --git a/MagickCore/cache.c b/MagickCore/cache.c index f0911c0de..70f5cebba 100644 --- a/MagickCore/cache.c +++ b/MagickCore/cache.c @@ -4833,7 +4833,7 @@ MagickPrivate VirtualPixelMethod SetPixelCacheVirtualMethod(Image *image, (void) SetCacheAlphaChannel(image,OpaqueAlpha,exception); if ((IsPixelInfoGray(&image->background_color) == MagickFalse) && (IsGrayColorspace(image->colorspace) != MagickFalse)) - (void) TransformImageColorspace(image,sRGBColorspace,exception); + (void) SetImageColorspace(image,sRGBColorspace,exception); break; } case TransparentVirtualPixelMethod: diff --git a/MagickCore/channel.c b/MagickCore/channel.c index cc784fdec..6e9a373eb 100644 --- a/MagickCore/channel.c +++ b/MagickCore/channel.c @@ -484,6 +484,8 @@ MagickExport Image *CombineImages(const Image *image, combine_image=DestroyImage(combine_image); return((Image *) NULL); } + if (IsGrayColorspace(image->colorspace) != MagickFalse) + (void) SetImageColorspace(combine_image,sRGBColorspace,exception); if ((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0) combine_image->alpha_trait=BlendPixelTrait; /* diff --git a/MagickCore/distort.c b/MagickCore/distort.c index 08f6a02c9..1faedf998 100644 --- a/MagickCore/distort.c +++ b/MagickCore/distort.c @@ -2292,7 +2292,7 @@ MagickExport Image *DistortImage(const Image *image,DistortImageMethod method, } if ((IsPixelInfoGray(&distort_image->background_color) == MagickFalse) && (IsGrayColorspace(distort_image->colorspace) != MagickFalse)) - (void) TransformImageColorspace(distort_image,sRGBColorspace,exception); + (void) SetImageColorspace(distort_image,sRGBColorspace,exception); if (distort_image->background_color.alpha_trait == BlendPixelTrait) distort_image->alpha_trait=BlendPixelTrait; distort_image->page.x=geometry.x; diff --git a/MagickCore/draw.c b/MagickCore/draw.c index 75153b2a8..bd5816895 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -4148,7 +4148,7 @@ MagickExport MagickBooleanType DrawPrimitive(Image *image, if ((IsGrayColorspace(image->colorspace) != MagickFalse) && ((IsPixelInfoGray(&draw_info->fill) == MagickFalse) || (IsPixelInfoGray(&draw_info->stroke) == MagickFalse))) - (void) TransformImageColorspace(image,sRGBColorspace,exception); + (void) SetImageColorspace(image,sRGBColorspace,exception); status=MagickTrue; x=(ssize_t) ceil(primitive_info->point.x-0.5); y=(ssize_t) ceil(primitive_info->point.y-0.5); diff --git a/MagickCore/enhance.c b/MagickCore/enhance.c index 5242008c6..f45a296fe 100644 --- a/MagickCore/enhance.c +++ b/MagickCore/enhance.c @@ -327,7 +327,7 @@ MagickExport MagickBooleanType ClutImage(Image *image,const Image *clut_image, return(MagickFalse); if ((IsGrayColorspace(image->colorspace) != MagickFalse) && (IsGrayColorspace(clut_image->colorspace) == MagickFalse)) - (void) TransformImageColorspace(image,sRGBColorspace,exception); + (void) SetImageColorspace(image,sRGBColorspace,exception); clut_map=(PixelInfo *) AcquireQuantumMemory(MaxMap+1UL,sizeof(*clut_map)); if (clut_map == (PixelInfo *) NULL) ThrowBinaryException(ResourceLimitError,"MemoryAllocationFailed", @@ -1951,14 +1951,14 @@ MagickExport MagickBooleanType GrayscaleImage(Image *image, case Rec601LuminancePixelIntensityMethod: case Rec709LuminancePixelIntensityMethod: { - (void) TransformImageColorspace(image,RGBColorspace,exception); + (void) SetImageColorspace(image,RGBColorspace,exception); break; } case Rec601LumaPixelIntensityMethod: case Rec709LumaPixelIntensityMethod: case UndefinedPixelIntensityMethod: { - (void) TransformImageColorspace(image,sRGBColorspace,exception); + (void) SetImageColorspace(image,sRGBColorspace,exception); break; } default: @@ -2658,7 +2658,7 @@ MagickExport MagickBooleanType LevelImageColors(Image *image, if ((IsGrayColorspace(image->colorspace) != MagickFalse) && ((IsGrayColorspace(black_color->colorspace) == MagickFalse) || (IsGrayColorspace(white_color->colorspace) == MagickFalse))) - (void) TransformImageColorspace(image,sRGBColorspace,exception); + (void) SetImageColorspace(image,sRGBColorspace,exception); status=MagickFalse; if (invert == MagickFalse) { @@ -3069,7 +3069,7 @@ MagickExport MagickBooleanType ModulateImage(Image *image,const char *modulate, if (modulate == (char *) NULL) return(MagickFalse); if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse) - (void) TransformImageColorspace(image,sRGBColorspace,exception); + (void) SetImageColorspace(image,sRGBColorspace,exception); flags=ParseGeometry(modulate,&geometry_info); percent_brightness=geometry_info.rho; percent_saturation=geometry_info.sigma; diff --git a/MagickCore/fx.c b/MagickCore/fx.c index 51dacb37a..05d170d8c 100644 --- a/MagickCore/fx.c +++ b/MagickCore/fx.c @@ -4267,7 +4267,7 @@ MagickExport Image *ShadowImage(const Image *image,const double alpha, if (clone_image == (Image *) NULL) return((Image *) NULL); if (IsGrayColorspace(image->colorspace) != MagickFalse) - (void) TransformImageColorspace(clone_image,sRGBColorspace,exception); + (void) SetImageColorspace(clone_image,sRGBColorspace,exception); (void) SetImageVirtualPixelMethod(clone_image,TransparentVirtualPixelMethod, exception); border_info.width=(size_t) floor(2.0*sigma+0.5); @@ -4563,7 +4563,7 @@ MagickExport MagickBooleanType SolarizeImage(Image *image, if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); if (IsGrayColorspace(image->colorspace) != MagickFalse) - (void) TransformImageColorspace(image,sRGBColorspace,exception); + (void) SetImageColorspace(image,sRGBColorspace,exception); if (image->storage_class == PseudoClass) { register ssize_t diff --git a/MagickCore/nt-feature.c b/MagickCore/nt-feature.c index 3208301dd..1c9afe261 100644 --- a/MagickCore/nt-feature.c +++ b/MagickCore/nt-feature.c @@ -180,7 +180,7 @@ MagickExport void *CropImageToHBITMAP(Image *image, if ( bitmap.bmBits == NULL ) bitmap.bmBits = bitmap_bits; if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse) - TransformImageColorspace(image,sRGBColorspace,exception); + SetImageColorspace(image,sRGBColorspace,exception); /* Extract crop image. */ @@ -626,7 +626,7 @@ MagickExport void *ImageToHBITMAP(Image *image,ExceptionInfo *exception) q=bitmap_bits; if (bitmap.bmBits == NULL) bitmap.bmBits=bitmap_bits; - (void) TransformImageColorspace(image,sRGBColorspace,exception); + (void) SetImageColorspace(image,sRGBColorspace,exception); for (y=0; y < (ssize_t) image->rows; y++) { p=GetVirtualPixels(image,0,y,image->columns,1,exception); diff --git a/MagickCore/paint.c b/MagickCore/paint.c index e9d1df8fe..cd91631e3 100644 --- a/MagickCore/paint.c +++ b/MagickCore/paint.c @@ -173,7 +173,7 @@ MagickExport MagickBooleanType FloodfillPaintImage(Image *image, if (SetImageStorageClass(image,DirectClass,exception) == MagickFalse) return(MagickFalse); if (IsGrayColorspace(image->colorspace) != MagickFalse) - (void) TransformImageColorspace(image,sRGBColorspace,exception); + (void) SetImageColorspace(image,sRGBColorspace,exception); if ((image->alpha_trait != BlendPixelTrait) && (draw_info->fill.alpha_trait == BlendPixelTrait)) (void) SetImageAlpha(image,OpaqueAlpha,exception); @@ -782,7 +782,7 @@ MagickExport MagickBooleanType OpaquePaintImage(Image *image, return(MagickFalse); if ((IsGrayColorspace(image->colorspace) != MagickFalse) && (IsPixelInfoGray(fill) == MagickFalse)) - (void) TransformImageColorspace(image,sRGBColorspace,exception); + (void) SetImageColorspace(image,sRGBColorspace,exception); if ((fill->alpha_trait == BlendPixelTrait) && (image->alpha_trait != BlendPixelTrait)) (void) SetImageAlpha(image,OpaqueAlpha,exception); diff --git a/MagickCore/threshold.c b/MagickCore/threshold.c index d39ba2301..795d1ba28 100644 --- a/MagickCore/threshold.c +++ b/MagickCore/threshold.c @@ -419,7 +419,7 @@ MagickExport MagickBooleanType BilevelImage(Image *image,const double threshold, if (SetImageStorageClass(image,DirectClass,exception) == MagickFalse) return(MagickFalse); if (IsGrayColorspace(image->colorspace) != MagickFalse) - (void) TransformImageColorspace(image,sRGBColorspace,exception); + (void) SetImageColorspace(image,sRGBColorspace,exception); /* Bilevel threshold image. */ @@ -556,7 +556,7 @@ MagickExport MagickBooleanType BlackThresholdImage(Image *image, if (SetImageStorageClass(image,DirectClass,exception) == MagickFalse) return(MagickFalse); if (IsGrayColorspace(image->colorspace) != MagickFalse) - (void) TransformImageColorspace(image,sRGBColorspace,exception); + (void) SetImageColorspace(image,sRGBColorspace,exception); GetPixelInfo(image,&threshold); flags=ParseGeometry(thresholds,&geometry_info); threshold.red=geometry_info.rho;