]> granicus.if.org Git - imagemagick/commitdiff
https://imagemagick.org/discourse-server/viewtopic.php?f=3&t=35185
authorCristy <urban-warrior@imagemagick.org>
Sat, 15 Dec 2018 22:21:59 +0000 (17:21 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sat, 15 Dec 2018 22:21:59 +0000 (17:21 -0500)
MagickCore/image.c

index 6c0bb4efd4acc39e35876c0735c0e30a389ee9c4..bad8255f5d9caed82c6990b9a02d1987c5fa63e9 100644 (file)
@@ -4176,35 +4176,7 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info,
     units=(ResolutionType) ParseCommandOption(MagickResolutionOptions,
       MagickFalse,option);
   if (units != UndefinedResolution)
-    {
-      if (image->units != units)
-        switch (image->units)
-        {
-          case PixelsPerInchResolution:
-          {
-            if (units == PixelsPerCentimeterResolution)
-              {
-                image->resolution.x/=2.54;
-                image->resolution.y/=2.54;
-              }
-            break;
-          }
-          case PixelsPerCentimeterResolution:
-          {
-            if (units == PixelsPerInchResolution)
-              {
-                image->resolution.x=(double) ((size_t) (100.0*2.54*
-                  image->resolution.x+0.5))/100.0;
-                image->resolution.y=(double) ((size_t) (100.0*2.54*
-                  image->resolution.y+0.5))/100.0;
-              }
-            break;
-          }
-          default:
-            break;
-        }
-      image->units=units;
-    }
+    image->units=units;
   option=GetImageOption(image_info,"virtual-pixel");
   if (option != (const char *) NULL)
     (void) SetImageVirtualPixelMethod(image,(VirtualPixelMethod)