]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Wed, 13 Mar 2013 00:34:24 +0000 (00:34 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Wed, 13 Mar 2013 00:34:24 +0000 (00:34 +0000)
MagickCore/effect.c
MagickCore/enhance.c
MagickCore/paint.c

index b42fd6b3a5441bbbef0968459a8377570c921992..970bc055bc5f9ab5e99a5f61c8a712aaed00475d 100644 (file)
@@ -2978,8 +2978,6 @@ MagickExport Image *ShadeImage(const Image *image,const MagickBooleanType gray,
         shade_image=DestroyImage(shade_image);
       return((Image *) NULL);
     }
-  if (image->colorspace == sRGBColorspace)
-    (void) TransformImageColorspace(linear_image,RGBColorspace,exception);
   if (SetImageStorageClass(shade_image,DirectClass,exception) == MagickFalse)
     {
       linear_image=DestroyImage(linear_image);
@@ -3133,8 +3131,6 @@ MagickExport Image *ShadeImage(const Image *image,const MagickBooleanType gray,
   shade_view=DestroyCacheView(shade_view);
   image_view=DestroyCacheView(image_view);
   linear_image=DestroyImage(linear_image);
-  if (image->colorspace == sRGBColorspace)
-    (void) TransformImageColorspace(shade_image,sRGBColorspace,exception);
   if (status == MagickFalse)
     shade_image=DestroyImage(shade_image);
   return(shade_image);
index 112c7b11b16444fc8162686260c4449e46389820..7c8919ebba4d77a07c6097a4bb44fae64ff057fd 100644 (file)
@@ -998,9 +998,6 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image,
   CacheView
     *image_view;
 
-  ColorspaceType
-    colorspace;
-
   MagickBooleanType
     status;
 
@@ -1052,9 +1049,6 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image,
   /*
     Form histogram.
   */
-  colorspace=image->colorspace;
-  if (colorspace == sRGBColorspace)
-    (void) SetImageColorspace(image,RGBColorspace,exception);
   status=MagickTrue;
   (void) ResetMagickMemory(histogram,0,(MaxMap+1)*GetPixelChannels(image)*
     sizeof(*histogram));
@@ -1254,8 +1248,6 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image,
           status=MagickFalse;
       }
   }
-  if (colorspace == sRGBColorspace)
-    (void) SetImageColorspace(image,sRGBColorspace,exception);
   image_view=DestroyCacheView(image_view);
   stretch_map=(double *) RelinquishMagickMemory(stretch_map);
   white=(double *) RelinquishMagickMemory(white);
index e81c41c093a02065f452f08ecfe7f5055c91051d..c0821819be8b0222d243ff6d7255478b681850fc 100644 (file)
@@ -174,7 +174,8 @@ MagickExport MagickBooleanType FloodfillPaintImage(Image *image,
     return(MagickFalse);
   if (IsGrayColorspace(image->colorspace) != MagickFalse)
     (void) TransformImageColorspace(image,RGBColorspace,exception);
-  if ((image->alpha_trait != BlendPixelTrait) && (draw_info->fill.alpha_trait == BlendPixelTrait))
+  if ((image->alpha_trait != BlendPixelTrait) &&
+      (draw_info->fill.alpha_trait == BlendPixelTrait))
     (void) SetImageAlpha(image,OpaqueAlpha,exception);
   /*
     Set floodfill state.
@@ -577,8 +578,6 @@ MagickExport Image *OilPaintImage(const Image *image,const double radius,
         linear_image=DestroyImage(paint_image);
       return((Image *) NULL);
     }
-  if (image->colorspace == sRGBColorspace)
-    (void) TransformImageColorspace(linear_image,sRGBColorspace,exception);
   if (SetImageStorageClass(paint_image,DirectClass,exception) == MagickFalse)
     {
       linear_image=DestroyImage(linear_image);
@@ -708,8 +707,6 @@ MagickExport Image *OilPaintImage(const Image *image,const double radius,
   image_view=DestroyCacheView(image_view);
   histograms=DestroyHistogramThreadSet(histograms);
   linear_image=DestroyImage(linear_image);
-  if (image->colorspace == sRGBColorspace)
-    (void) TransformImageColorspace(paint_image,sRGBColorspace,exception);
   if (status == MagickFalse)
     paint_image=DestroyImage(paint_image);
   return(paint_image);
@@ -786,7 +783,8 @@ MagickExport MagickBooleanType OpaquePaintImage(Image *image,
   if ((IsGrayColorspace(image->colorspace) != MagickFalse) &&
       (IsPixelInfoGray(fill) == MagickFalse))
     (void) TransformImageColorspace(image,RGBColorspace,exception);
-  if ((fill->alpha_trait == BlendPixelTrait) && (image->alpha_trait != BlendPixelTrait))
+  if ((fill->alpha_trait == BlendPixelTrait) &&
+      (image->alpha_trait != BlendPixelTrait))
     (void) SetImageAlpha(image,OpaqueAlpha,exception);
   /*
     Make image color opaque.