From: Cristy Date: Tue, 8 Jan 2019 00:57:01 +0000 (-0500) Subject: https://github.com/ImageMagick/ImageMagick/issues/1442 X-Git-Tag: 7.0.8-24~29 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d3edc3a1bd71366d9b5b386325d8df09b8aa84a;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/1442 --- diff --git a/MagickCore/image.c b/MagickCore/image.c index 58a0065e4..ff49078e2 100644 --- a/MagickCore/image.c +++ b/MagickCore/image.c @@ -4177,7 +4177,35 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info, units=(ResolutionType) ParseCommandOption(MagickResolutionOptions, MagickFalse,option); if (units != UndefinedResolution) - image->units=units; + { + 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; + } option=GetImageOption(image_info,"virtual-pixel"); if (option != (const char *) NULL) (void) SetImageVirtualPixelMethod(image,(VirtualPixelMethod) diff --git a/configure b/configure index c91d9c75a..ac7dcb822 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for ImageMagick 7.0.8-23. +# Generated by GNU Autoconf 2.69 for ImageMagick 7.0.8-24. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ImageMagick' PACKAGE_TARNAME='ImageMagick' -PACKAGE_VERSION='7.0.8-23' -PACKAGE_STRING='ImageMagick 7.0.8-23' +PACKAGE_VERSION='7.0.8-24' +PACKAGE_STRING='ImageMagick 7.0.8-24' PACKAGE_BUGREPORT='https://github.com/ImageMagick/ImageMagick/issues' PACKAGE_URL='https://imagemagick.org' @@ -1852,7 +1852,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ImageMagick 7.0.8-23 to adapt to many kinds of systems. +\`configure' configures ImageMagick 7.0.8-24 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1927,7 +1927,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ImageMagick 7.0.8-23:";; + short | recursive ) echo "Configuration of ImageMagick 7.0.8-24:";; esac cat <<\_ACEOF @@ -2219,7 +2219,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ImageMagick configure 7.0.8-23 +ImageMagick configure 7.0.8-24 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -3270,7 +3270,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ImageMagick $as_me 7.0.8-23, which was +It was created by ImageMagick $as_me 7.0.8-24, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4256,7 +4256,7 @@ fi # Define the identity of the package. PACKAGE='ImageMagick' - VERSION='7.0.8-23' + VERSION='7.0.8-24' cat >>confdefs.h <<_ACEOF @@ -4566,11 +4566,11 @@ MAGICK_MINOR_VERSION=0 MAGICK_MICRO_VERSION=8 -MAGICK_PATCHLEVEL_VERSION=23 +MAGICK_PATCHLEVEL_VERSION=24 -MAGICK_VERSION=7.0.8-23 +MAGICK_VERSION=7.0.8-24 -MAGICK_GIT_REVISION=15194:2d1afb1e6:20181230 +MAGICK_GIT_REVISION=15212:7aa5ec421:20190107 # Substitute library versioning @@ -37777,7 +37777,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ImageMagick $as_me 7.0.8-23, which was +This file was extended by ImageMagick $as_me 7.0.8-24, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -37844,7 +37844,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ImageMagick config.status 7.0.8-23 +ImageMagick config.status 7.0.8-24 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\"