]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 16 Oct 2011 16:26:41 +0000 (16:26 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 16 Oct 2011 16:26:41 +0000 (16:26 +0000)
MagickWand/mogrify.c
MagickWand/operation.c
PerlMagick/Magick.xs

index 4994e54f958ffd6a7cc3f5b0ca7b03cf0e9e40ca..ef122d9e8ab3a216dd3b80da4973822a76b93a97 100644 (file)
@@ -903,7 +903,6 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
             */
             (void) SyncImageSettings(mogrify_info,*image);
             (void) BlackThresholdImage(*image,argv[i+1],exception);
-            InheritException(exception,&(*image)->exception);
             break;
           }
         if (LocaleCompare("blue-shift",option+1) == 0)
@@ -986,7 +985,6 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
               contrast=geometry_info.sigma;
             (void) BrightnessContrastImage(*image,brightness,contrast,
               exception);
-            InheritException(exception,&(*image)->exception);
             break;
           }
         break;
@@ -1007,7 +1005,6 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
               break;
             (void) ColorDecisionListImage(*image,color_correction_collection,
               exception);
-            InheritException(exception,&(*image)->exception);
             break;
           }
         if (LocaleCompare("channel",option+1) == 0)
@@ -1121,7 +1118,6 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
             mask_view=DestroyCacheView(mask_view);
             mask_image->matte=MagickTrue;
             (void) SetImageClipMask(*image,mask_image,exception);
-            InheritException(exception,&(*image)->exception);
             break;
           }
         if (LocaleCompare("clip-path",option+1) == 0)
@@ -1225,7 +1221,6 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
               white_point;
             (void) ContrastStretchImage(*image,black_point,white_point,
               exception);
-            InheritException(exception,&(*image)->exception);
             break;
           }
         if (LocaleCompare("convolve",option+1) == 0)
@@ -1913,7 +1908,6 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
             else
               (void) LevelImage(*image,black_point,white_point,gamma,
                 exception);
-            InheritException(exception,&(*image)->exception);
             break;
           }
         if (LocaleCompare("level-colors",option+1) == 0)
@@ -1979,7 +1973,6 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
               white_point=(MagickRealType) (*image)->columns*(*image)->rows-
                 black_point;
             (void) LinearStretchImage(*image,black_point,white_point,exception);
-            InheritException(exception,&(*image)->exception);
             break;
           }
         if (LocaleCompare("linewidth",option+1) == 0)
@@ -2505,7 +2498,6 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
                 break;
               }
             (void) ResetImagePage(*image,argv[i+1]);
-            InheritException(exception,&(*image)->exception);
             break;
           }
         if (LocaleCompare("resample",option+1) == 0)
@@ -2939,7 +2931,6 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
             else
               threshold=SiPrefixToDouble(argv[i+1],QuantumRange);
             (void) BilevelImage(*image,threshold,exception);
-            InheritException(exception,&(*image)->exception);
             break;
           }
         if (LocaleCompare("thumbnail",option+1) == 0)
@@ -2994,7 +2985,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
               exception);
             (void) TransparentPaintImage(*image,&target,(Quantum)
               TransparentAlpha,*option == '-' ? MagickFalse : MagickTrue,
-              &(*image)->exception);
+              exception);
             break;
           }
         if (LocaleCompare("transpose",option+1) == 0)
@@ -3173,7 +3164,6 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
             */
             (void) SyncImageSettings(mogrify_info,*image);
             (void) WhiteThresholdImage(*image,argv[i+1],exception);
-            InheritException(exception,&(*image)->exception);
             break;
           }
         break;
@@ -3207,8 +3197,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
   quantize_info=DestroyQuantizeInfo(quantize_info);
   draw_info=DestroyDrawInfo(draw_info);
   mogrify_info=DestroyImageInfo(mogrify_info);
-  status=(MagickStatusType) ((*image)->exception.severity ==
-    UndefinedException ? 1 : 0);
+  status=(MagickStatusType) (exception->severity == UndefinedException ? 1 : 0);
   return(status == 0 ? MagickFalse : MagickTrue);
 }
 \f
@@ -7472,7 +7461,6 @@ WandExport MagickBooleanType MogrifyImageList(ImageInfo *image_info,
             if (mask_image != (Image *) NULL)
               mask_image=image->mask=DestroyImage(image->mask);
             composite_image=DestroyImage(composite_image);
-            InheritException(exception,&image->exception);
             *images=DestroyImageList(*images);
             *images=image;
             break;
@@ -7886,7 +7874,6 @@ WandExport MagickBooleanType MogrifyImageList(ImageInfo *image_info,
             }
             if (layers == (Image *) NULL)
               break;
-            InheritException(exception,&layers->exception);
             *images=DestroyImageList(*images);
             *images=layers;
             break;
@@ -8071,7 +8058,6 @@ WandExport MagickBooleanType MogrifyImageList(ImageInfo *image_info,
         if (LocaleCompare("reverse",option+1) == 0)
           {
             ReverseImageList(images);
-            InheritException(exception,&(*images)->exception);
             break;
           }
         break;
index 205665f312544cb89ead33e4da63ea5d3afcda40..8bd5a3aa9f4ebd8e78b64e53c5b41168f81249a0 100644 (file)
@@ -1751,7 +1751,6 @@ MagickExport MagickBooleanType ApplyImageOperator(MagickWand *wand,
         {
           (void) SyncImageSettings(image_info,*image);
           (void) BlackThresholdImage(*image,argv[1],exception);
-          InheritException(exception,&(*image)->exception);
           break;
         }
       if (LocaleCompare("blue-shift",argv[0]+1) == 0)
@@ -1819,7 +1818,6 @@ MagickExport MagickBooleanType ApplyImageOperator(MagickWand *wand,
             contrast=geometry_info.sigma;
           (void) BrightnessContrastImage(*image,brightness,contrast,
             exception);
-          InheritException(exception,&(*image)->exception);
           break;
         }
       break;
@@ -1840,7 +1838,6 @@ MagickExport MagickBooleanType ApplyImageOperator(MagickWand *wand,
             break;
           (void) ColorDecisionListImage(*image,color_correction_collection,
             exception);
-          InheritException(exception,&(*image)->exception);
           break;
         }
       if (LocaleCompare("channel",argv[0]+1) == 0)
@@ -1940,7 +1937,6 @@ MagickExport MagickBooleanType ApplyImageOperator(MagickWand *wand,
           mask_image->matte=MagickTrue;
           (void) SetImageClipMask(*image,mask_image,exception);
           mask_image=DestroyImage(mask_image);
-          InheritException(exception,&(*image)->exception);
           break;
         }
       if (LocaleCompare("clip-path",argv[0]+1) == 0)
@@ -2031,7 +2027,6 @@ MagickExport MagickBooleanType ApplyImageOperator(MagickWand *wand,
             white_point;
           (void) ContrastStretchImage(*image,black_point,white_point,
             exception);
-          InheritException(exception,&(*image)->exception);
           break;
         }
       if (LocaleCompare("convolve",argv[0]+1) == 0)
@@ -2602,7 +2597,6 @@ MagickExport MagickBooleanType ApplyImageOperator(MagickWand *wand,
           else
             (void) LevelImage(*image,black_point,white_point,gamma,
               exception);
-          InheritException(exception,&(*image)->exception);
           break;
         }
       if (LocaleCompare("level-colors",argv[0]+1) == 0)
@@ -2668,7 +2662,6 @@ MagickExport MagickBooleanType ApplyImageOperator(MagickWand *wand,
             white_point=(MagickRealType) (*image)->columns*(*image)->rows-
               black_point;
           (void) LinearStretchImage(*image,black_point,white_point,exception);
-          InheritException(exception,&(*image)->exception);
           break;
         }
       if (LocaleCompare("linewidth",argv[0]+1) == 0)
@@ -3164,7 +3157,6 @@ MagickExport MagickBooleanType ApplyImageOperator(MagickWand *wand,
               break;
             }
           (void) ResetImagePage(*image,argv[1]);
-          InheritException(exception,&(*image)->exception);
           break;
         }
       if (LocaleCompare("resample",argv[0]+1) == 0)
@@ -3648,7 +3640,7 @@ MagickExport MagickBooleanType ApplyImageOperator(MagickWand *wand,
                        exception);
           (void) TransparentPaintImage(*image,&target,(Quantum)
             TransparentAlpha,*argv[0] == '-' ? MagickFalse : MagickTrue,
-            &(*image)->exception);
+            exception);
           break;
         }
       if (LocaleCompare("transpose",argv[0]+1) == 0)
@@ -3827,7 +3819,6 @@ MagickExport MagickBooleanType ApplyImageOperator(MagickWand *wand,
           */
           (void) SyncImageSettings(image_info,*image);
           (void) WhiteThresholdImage(*image,argv[1],exception);
-          InheritException(exception,&(*image)->exception);
           break;
         }
       break;
@@ -3846,8 +3837,7 @@ MagickExport MagickBooleanType ApplyImageOperator(MagickWand *wand,
   */
   quantize_info=DestroyQuantizeInfo(quantize_info);
   draw_info=DestroyDrawInfo(draw_info);
-  status=(MagickStatusType) ((*image)->exception.severity ==
-    UndefinedException ? 1 : 0);
+  status=(MagickStatusType) (exception->severity == UndefinedException ? 1 : 0);
   return(status == 0 ? MagickFalse : MagickTrue);
 }
 \f
@@ -4527,7 +4517,6 @@ WandExport MagickBooleanType SequenceOperationImages(ImageInfo *image_info,
           }
           if (layers == (Image *) NULL)
             break;
-          InheritException(exception,&layers->exception);
           *images=DestroyImageList(*images);
           *images=layers;
           break;
@@ -4711,7 +4700,6 @@ WandExport MagickBooleanType SequenceOperationImages(ImageInfo *image_info,
       if (LocaleCompare("reverse",argv[0]+1) == 0)
         {
           ReverseImageList(images);
-          InheritException(exception,&(*images)->exception);
           break;
         }
       break;
@@ -4817,8 +4805,7 @@ WandExport MagickBooleanType SequenceOperationImages(ImageInfo *image_info,
   }
   quantize_info=DestroyQuantizeInfo(quantize_info);
 
-  status=(MagickStatusType) ((*image)->exception.severity ==
-    UndefinedException ? 1 : 0);
+  status=(MagickStatusType) (exception->severity == UndefinedException ? 1 : 0);
   return(status != 0 ? MagickTrue : MagickFalse);
 }
 #endif
index 560886dbe16e9887a41ff264c89b305a0d27e125..73e70d4b2f34ed38eacf9863aea6c96906bb46c6 100644 (file)
@@ -3859,8 +3859,7 @@ Features(ref,...)
     count=0;
     for ( ; image; image=image->next)
     {
-      channel_features=GetImageFeatures(image,distance,
-        &image->exception);
+      channel_features=GetImageFeatures(image,distance,exception);
       if (channel_features == (ChannelFeatures *) NULL)
         continue;
       count++;
@@ -4398,7 +4397,7 @@ Get(ref,...)
 
               if (image == (Image *) NULL)
                 break;
-              page=GetImageBoundingBox(image,&image->exception);
+              page=GetImageBoundingBox(image,exception);
               (void) FormatLocaleString(geometry,MaxTextExtent,
                 "%.20gx%.20g%+.20g%+.20g",(double) page.width,(double)
                 page.height,(double) page.x,(double) page.y);
@@ -4490,7 +4489,7 @@ Get(ref,...)
             {
               if (image != (Image *) NULL)
                 s=newSViv((ssize_t) GetNumberColors(image,(FILE *) NULL,
-                  &image->exception));
+                  exception));
               PUSHs(s ? sv_2mortal(s) : &sv_undef);
               continue;
             }
@@ -4569,7 +4568,7 @@ Get(ref,...)
             {
               s=newSViv(MAGICKCORE_QUANTUM_DEPTH);
               if (image != (Image *) NULL)
-                s=newSViv((ssize_t) GetImageDepth(image,&image->exception));
+                s=newSViv((ssize_t) GetImageDepth(image,exception));
               PUSHs(s ? sv_2mortal(s) : &sv_undef);
               continue;
             }
@@ -4694,7 +4693,7 @@ Get(ref,...)
               if (info && (*info->image_info->magick != '\0'))
                 magick_info=GetMagickInfo(info->image_info->magick,exception);
               if (image != (Image *) NULL)
-                magick_info=GetMagickInfo(image->magick,&image->exception);
+                magick_info=GetMagickInfo(image->magick,exception);
               if ((magick_info != (const MagickInfo *) NULL) &&
                   (*magick_info->description != '\0'))
                 s=newSVpv((char *) magick_info->description,0);
@@ -4818,7 +4817,7 @@ Get(ref,...)
                   (void) FormatLocaleString(key,MaxTextExtent,"%.20g\n",(double)
                     id);
                   status=SetImageRegistry(ImageRegistryType,key,image,
-                    &image->exception);
+                    exception);
                   (void) status;
                   s=newSViv(id++);
                 }
@@ -4852,7 +4851,7 @@ Get(ref,...)
               items=sscanf(attribute,"%*[^[][%ld%*[,/]%ld",&x,&y);
               (void) items;
               image_view=AcquireCacheView(image);
-              p=GetCacheViewVirtualPixels(image_view,x,y,1,1,&image->exception);
+              p=GetCacheViewVirtualPixels(image_view,x,y,1,1,exception);
               if (p != (const Quantum *) NULL)
                 {
                   (void) FormatLocaleString(name,MaxTextExtent,QuantumFormat,
@@ -5020,7 +5019,7 @@ Get(ref,...)
               if (image == (Image *) NULL)
                 continue;
               j=info ? info->image_info->monochrome :
-                IsImageMonochrome(image,&image->exception);
+                IsImageMonochrome(image,exception);
               s=newSViv(j);
               PUSHs(s ? sv_2mortal(s) : &sv_undef);
               continue;
@@ -5300,7 +5299,7 @@ Get(ref,...)
             {
               if (image == (Image *) NULL)
                 break;
-              j=(ssize_t) GetImageType(image,&image->exception);
+              j=(ssize_t) GetImageType(image,exception);
               s=newSViv(j);
               (void) sv_setpv(s,CommandOptionToMnemonic(MagickTypeOptions,j));
               SvIOK_on(s);
@@ -5998,7 +5997,7 @@ Histogram(ref,...)
     count=0;
     for ( ; image; image=image->next)
     {
-      histogram=GetImageHistogram(image,&number_colors,&image->exception);
+      histogram=GetImageHistogram(image,&number_colors,exception);
       if (histogram == (PixelInfo *) NULL)
         continue;
       count+=(ssize_t) number_colors;
@@ -6564,7 +6563,7 @@ ImageToBlob(ref,...)
       next->scene=scene++;
     }
     SetImageInfo(package_info->image_info,(unsigned int)
-      GetImageListLength(image),&image->exception);
+      GetImageListLength(image),exception);
     EXTEND(sp,(ssize_t) GetImageListLength(image));
     for ( ; image; image=image->next)
     {
@@ -6763,19 +6762,16 @@ Layers(ref,...)
       case OptimizeTransLayer:
       {
         OptimizeImageTransparency(image,exception);
-        InheritException(&(image->exception),exception);
         break;
       }
       case RemoveDupsLayer:
       {
         RemoveDuplicateLayers(&image,exception);
-        InheritException(&(image->exception),exception);
         break;
       }
       case RemoveZeroLayer:
       {
         RemoveZeroDelayLayers(&image,exception);
-        InheritException(&(image->exception),exception);
         break;
       }
       case OptimizeLayer:
@@ -6799,7 +6795,6 @@ Layers(ref,...)
         image=layers;
         layers=(Image *) NULL;
         OptimizeImageTransparency(image,exception);
-        InheritException(&(image->exception),exception);
         quantize_info=AcquireQuantizeInfo(info->image_info);
         (void) RemapImages(quantize_info,image,(Image *) NULL,exception);
         quantize_info=DestroyQuantizeInfo(quantize_info);
@@ -6858,7 +6853,6 @@ Layers(ref,...)
           image->rows,image->gravity,&geometry);
         CompositeLayers(image,compose,source,geometry.x,geometry.y,exception);
         source=DestroyImageList(source);
-        InheritException(&(image->exception),exception);
         break;
       }
     }
@@ -8401,7 +8395,7 @@ Mogrify(ref,...)
                     Merge Y displacement into X displacement image.
                   */
                   composite_image=CloneImage(composite_image,0,0,MagickTrue,
-                    &image->exception);
+                    exception);
                   (void) CompositeImage(composite_image,CopyGreenCompositeOp,
                     argument_list[10].image_reference,0,0,exception);
                 }
@@ -8411,7 +8405,7 @@ Mogrify(ref,...)
                     Set a blending mask for the composition.
                   */
                   image->mask=CloneImage(argument_list[10].image_reference,0,0,
-                    MagickTrue,&image->exception);
+                    MagickTrue,exception);
                   (void) NegateImage(image->mask,MagickFalse,exception);
                 }
             }
@@ -9325,7 +9319,7 @@ Mogrify(ref,...)
           profile_info=
             CloneImageInfo(info ? info->image_info : (ImageInfo *) NULL);
           (void) CopyMagickString(profile_info->filename,name,MaxTextExtent);
-          profile_image=ReadImages(profile_info,&image->exception);
+          profile_image=ReadImages(profile_info,exception);
           if (profile_image == (Image *) NULL)
             break;
           ResetImageProfileIterator(profile_image);
@@ -11482,7 +11476,7 @@ Mosaic(ref)
     info=GetPackageInfo(aTHX_ (void *) av,info,exception);
     (void) CopyMagickString(info->image_info->filename,image->filename,
       MaxTextExtent);
-    SetImageInfo(info->image_info,0,&image->exception);
+    SetImageInfo(info->image_info,0,exception);
     exception=DestroyExceptionInfo(exception);
     SvREFCNT_dec(perl_exception);
     XSRETURN(1);
@@ -12239,7 +12233,7 @@ QueryFontMetrics(ref,...)
             {
               if (info)
                 (void) QueryColorCompliance(SvPV(ST(i),na),AllCompliance,
-                  &draw_info->fill,&image->exception);
+                  &draw_info->fill,exception);
               break;
             }
           if (LocaleCompare(attribute,"font") == 0)
@@ -12361,7 +12355,7 @@ QueryFontMetrics(ref,...)
             {
               if (info)
                 (void) QueryColorCompliance(SvPV(ST(i),na),AllCompliance,
-                  &draw_info->stroke,&image->exception);
+                  &draw_info->stroke,exception);
               break;
             }
           if (LocaleCompare(attribute,"style") == 0)
@@ -12644,7 +12638,7 @@ QueryMultilineFontMetrics(ref,...)
             {
               if (info)
                 (void) QueryColorCompliance(SvPV(ST(i),na),AllCompliance,
-                  &draw_info->fill,&image->exception);
+                  &draw_info->fill,exception);
               break;
             }
           if (LocaleCompare(attribute,"font") == 0)
@@ -12734,7 +12728,7 @@ QueryMultilineFontMetrics(ref,...)
             {
               if (info)
                 (void) QueryColorCompliance(SvPV(ST(i),na),AllCompliance,
-                  &draw_info->stroke,&image->exception);
+                  &draw_info->stroke,exception);
               break;
             }
           if (LocaleCompare(attribute,"style") == 0)
@@ -13859,7 +13853,7 @@ Statistics(ref,...)
     count=0;
     for ( ; image; image=image->next)
     {
-      channel_statistics=GetImageStatistics(image,&image->exception);
+      channel_statistics=GetImageStatistics(image,exception);
       if (channel_statistics == (ChannelStatistics *) NULL)
         continue;
       count++;
@@ -13942,7 +13936,6 @@ SyncAuthenticPixels(ref,...)
     status=SyncAuthenticPixels(image,exception);
     if (status != MagickFalse)
       return;
-    InheritException(exception,&image->exception);
 
   PerlException:
     InheritPerlException(exception,perl_exception);
@@ -14201,7 +14194,7 @@ Write(ref,...)
       next->scene=scene++;
     }
     SetImageInfo(package_info->image_info,(unsigned int)
-      GetImageListLength(image),&image->exception);
+      GetImageListLength(image),exception);
     for (next=image; next; next=next->next)
     {
       (void) WriteImage(package_info->image_info,next,exception);