From: Cristy Date: Sat, 15 Dec 2018 22:21:59 +0000 (-0500) Subject: https://imagemagick.org/discourse-server/viewtopic.php?f=3&t=35185 X-Git-Tag: 7.0.8-17~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=084cb57c8a28e39000d3c2f3b8de33bba4c4e142;p=imagemagick https://imagemagick.org/discourse-server/viewtopic.php?f=3&t=35185 --- diff --git a/MagickCore/image.c b/MagickCore/image.c index 6c0bb4efd..bad8255f5 100644 --- a/MagickCore/image.c +++ b/MagickCore/image.c @@ -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)