]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 25 May 2014 17:36:53 +0000 (17:36 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 25 May 2014 17:36:53 +0000 (17:36 +0000)
MagickCore/fx.c
MagickCore/image.c
MagickCore/threshold.c
MagickCore/widget.c
MagickCore/xwindow.c
MagickWand/mogrify.c
coders/jpeg.c

index 41828353d4c5cfa19957e3bbc46772c7850cde2b..ff295b8946f719d1af49d07a763d212023e716a0 100644 (file)
@@ -1410,7 +1410,8 @@ static double FxGetSymbol(FxInfo *fx_info,const PixelChannel channel,
   length=GetImageListLength(fx_info->images);
   while (i < 0)
     i+=(ssize_t) length;
-  i%=length;
+  if (length != 0)
+    i%=length;
   image=GetImageFromList(fx_info->images,i);
   if (image == (Image *) NULL)
     {
index 642f25f4132cf0c911610064b64c047fa948b5fd..24237d598f54bfad02733fa294c81f003a435aa0 100644 (file)
@@ -874,7 +874,7 @@ MagickExport Image *CloneImage(const Image *image,const size_t columns,
   clone_image->ping=image->ping;
   clone_image->debug=IsEventLogging();
   clone_image->semaphore=AcquireSemaphoreInfo();
-  if ((columns == 0) && (rows == 0))
+  if ((columns == 0) || (rows == 0))
     {
       if (image->montage != (char *) NULL)
         (void) CloneString(&clone_image->montage,image->montage);
@@ -894,7 +894,6 @@ MagickExport Image *CloneImage(const Image *image,const size_t columns,
   clone_image->columns=columns;
   clone_image->rows=rows;
   clone_image->cache=ClonePixelCache(image->cache);
-
   return(clone_image);
 }
 \f
index e7f1103bd77590e4750febc61c3021f2f973555c..79389ce8412a0cefb470d7bfec036a95e0e2aed2 100644 (file)
@@ -1226,7 +1226,7 @@ MagickExport MagickBooleanType ListThresholdMaps(FILE *file,
   MagickStatusType
     status;
 
-  status=MagickFalse;
+  status=MagickTrue;
   if (file == (FILE *) NULL)
     file=stdout;
   options=GetConfigureOptions(ThresholdsFilename,exception);
index 3f14ac5cddcef0dfed8575af3f7b938d8c5d9381..a826db30c4ae2c32d682820542a7c86735a23524 100644 (file)
@@ -3025,8 +3025,8 @@ MagickPrivate int XCommandWidget(Display *display,XWindows *windows,
             }
           submenu_info=selection_info[i];
           submenu_info.active=MagickTrue;
-          toggle_info.y=
-            submenu_info.y+(submenu_info.height >> 1)-(toggle_info.height >> 1);
+          toggle_info.y=submenu_info.y+(submenu_info.height >> 1)-
+            (toggle_info.height >> 1);
           id=i;
           (void) XCheckWindowEvent(display,windows->widget.id,LeaveWindowMask,
             event);
@@ -3165,15 +3165,15 @@ MagickPrivate int XCommandWidget(Display *display,XWindows *windows,
         selection_info[i].bevel_width--;
         selection_info[i].height=(unsigned int) ((3*height) >> 1);
         selection_info[i].x=(QuantumMargin >> 1)+4;
-        selection_info[i].width=(unsigned int)
-          (windows->command.width-(selection_info[i].x << 1));
+        selection_info[i].width=(unsigned int) (windows->command.width-
+          (selection_info[i].x << 1));
         selection_info[i].y=y;
         y+=selection_info[i].height+(selection_info[i].bevel_width << 1)+6;
       }
       XGetWidgetInfo((char *) NULL,&toggle_info);
       toggle_info.bevel_width--;
-      toggle_info.width=(unsigned int)
-        (((5*height) >> 3)-(toggle_info.bevel_width << 1));
+      toggle_info.width=(unsigned int) (((5*height) >> 3)-
+        (toggle_info.bevel_width << 1));
       toggle_info.height=toggle_info.width;
       toggle_info.x=selection_info[0].x+selection_info[0].width-
         toggle_info.width-(QuantumMargin >> 1);
@@ -3203,8 +3203,8 @@ MagickPrivate int XCommandWidget(Display *display,XWindows *windows,
         if (i >= (int) windows->command.data)
           continue;
         toggle_info.raised=MagickFalse;
-        toggle_info.y=selection_info[i].y+
-          (selection_info[i].height >> 1)-(toggle_info.height >> 1);
+        toggle_info.y=selection_info[i].y+(selection_info[i].height >> 1)-
+          (toggle_info.height >> 1);
         XDrawTriangleEast(display,&windows->command,&toggle_info);
       }
       XHighlightWidget(display,&windows->command,BorderOffset,BorderOffset);
index 7b46aa29c03700b80c279a0f89a46b00d4501a9a..e3536488d371bf2bf139c594539e23a6376ffec3 100644 (file)
@@ -7163,6 +7163,8 @@ MagickPrivate void XMakeMagnifyImage(Display *display,XWindows *windows,
     magnify>>=1;
   while (magnify > windows->magnify.height)
     magnify>>=1;
+  if (magnify == 0)
+    magnify=1;
   if (magnify != previous_magnify)
     {
       Status
index 48c16c6798f19df005083a661c963b2d030c7fba..933154d72d2ad0bad972a834808c16c4d2a40116 100644 (file)
@@ -8613,13 +8613,11 @@ WandExport MagickBooleanType MogrifyImages(ImageInfo *image_info,
     return(MagickTrue);
   (void) SetImageInfoProgressMonitor(image_info,(MagickProgressMonitor) NULL,
     (void *) NULL);
-  status=0;
-
+  status=MagickTrue;
 #if 0
   (void) FormatLocaleFile(stderr, "mogrify start %s %d (%s)\n",argv[0],argc,
     post?"post":"pre");
 #endif
-
   /*
     Pre-process multi-image sequence operators
   */
@@ -8650,7 +8648,6 @@ WandExport MagickBooleanType MogrifyImages(ImageInfo *image_info,
   (void) FormatLocaleFile(stderr,"mogrify end %ld of %ld\n",(long)
     GetImageIndexInList(*images),(long)GetImageListLength(*images));
 #endif
-
   /*
     Post-process, multi-image sequence operators
   */
index df06543917795f0cbbc498cc07b39f9609cd80af..6e85aa76bc170161e3197fbc1aef839a175d71b5 100644 (file)
@@ -595,10 +595,10 @@ static boolean ReadIPTCProfile(j_decompress_ptr jpeg_info)
   for (i=0; i < 4; i++)
     (void) GetCharacter(jpeg_info);
   if (length <= 4)
-    return(MagickTrue);
+    return(TRUE);
   length-=4;
-  if (length == 0)
-    return(MagickTrue);
+  if (length <= 7)
+    return(TRUE);
   error_manager=(ErrorManager *) jpeg_info->client_data;
   exception=error_manager->exception;
   image=error_manager->image;