]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 2 Nov 2014 18:14:44 +0000 (18:14 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 2 Nov 2014 18:14:44 +0000 (18:14 +0000)
coders/jpeg.c

index 2df246983f8cf633e6161f70028629da5b900217..e837a1ec2ec23bcd288b3135aed3163e287f4aa4 100644 (file)
@@ -2256,24 +2256,8 @@ static MagickBooleanType WriteJPEGImage(const ImageInfo *image_info,
     }
   option=GetImageOption(image_info,"jpeg:optimize-coding");
   if (option != (const char *) NULL)
-    jpeg_info.optimize_coding=IsStringTrue(option) != MagickFalse ? TRUE : FALSE;
-  else
-    {
-      MagickSizeType
-        length;
-
-      length=(MagickSizeType) jpeg_info.input_components*image->columns*
-        image->rows*sizeof(JSAMPLE);
-      if (length == (MagickSizeType) ((size_t) length))
-        {
-          /*
-            Perform optimization only if available memory resources permit it.
-          */
-          status=AcquireMagickResource(MemoryResource,length);
-          RelinquishMagickResource(MemoryResource,length);
-          jpeg_info.optimize_coding=status == MagickFalse ? FALSE : TRUE;
-        }
-    }
+    jpeg_info.optimize_coding=IsStringTrue(option) != MagickFalse ? TRUE :
+      FALSE;
 #if (JPEG_LIB_VERSION >= 61) && defined(C_PROGRESSIVE_SUPPORTED)
   if ((LocaleCompare(image_info->magick,"PJPEG") == 0) ||
       (image_info->interlace != NoInterlace))