]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/1442
authorCristy <urban-warrior@imagemagick.org>
Tue, 8 Jan 2019 00:57:01 +0000 (19:57 -0500)
committerCristy <urban-warrior@imagemagick.org>
Tue, 8 Jan 2019 00:57:15 +0000 (19:57 -0500)
MagickCore/image.c
configure

index 58a0065e499e63819e3f434142937dd0b68904c2..ff49078e2e8ecfcd48a20eaf98d9a8a051aef413 100644 (file)
@@ -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)
index c91d9c75ac47cb9786aaa80b94f2386f1d02a66f..ac7dcb82283ebfc77f2ea0ab92adf864e60ce97c 100755 (executable)
--- 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 <https://github.com/ImageMagick/ImageMagick/issues>.
 #
@@ -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\\"