From a5da976dacd4e32fdbf0822ee78a722f423a175564344a9c7f8a026d2fbd8ff8 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Mon, 26 Apr 2010 11:40:16 +0000 Subject: [PATCH] - fixed units in the output [bnc#598714] * units.patch OBS-URL: https://build.opensuse.org/package/show/graphics/ImageMagick?expand=0&rev=28 --- ImageMagick-6.6.1.0-units.patch | 55 +++++++++++++++++++++++++++++++++ ImageMagick.changes | 6 ++++ ImageMagick.spec | 2 ++ 3 files changed, 63 insertions(+) create mode 100644 ImageMagick-6.6.1.0-units.patch diff --git a/ImageMagick-6.6.1.0-units.patch b/ImageMagick-6.6.1.0-units.patch new file mode 100644 index 0000000..cb8cc11 --- /dev/null +++ b/ImageMagick-6.6.1.0-units.patch @@ -0,0 +1,55 @@ +Index: ImageMagick-6.6.1-0/magick/image.c +=================================================================== +--- ImageMagick-6.6.1-0.orig/magick/image.c ++++ ImageMagick-6.6.1-0/magick/image.c +@@ -3959,6 +3959,9 @@ MagickExport MagickBooleanType SyncImage + MagickStatusType + flags; + ++ ResolutionType ++ units; ++ + /* + Sync image options. + */ +@@ -4150,16 +4153,18 @@ MagickExport MagickBooleanType SyncImage + option); + option=GetImageOption(image_info,"units"); + if (option != (const char *) NULL) +- image->units=(ResolutionType) ParseMagickOption(MagickResolutionOptions, ++ units=(ResolutionType) ParseMagickOption(MagickResolutionOptions, + MagickFalse,option); +- if (image_info->units != UndefinedResolution) ++ else ++ units = image_info->units; ++ if (units != UndefinedResolution) + { +- if (image->units != image_info->units) ++ if (image->units != units) + switch (image->units) + { + case PixelsPerInchResolution: + { +- if (image_info->units == PixelsPerCentimeterResolution) ++ if (units == PixelsPerCentimeterResolution) + { + image->x_resolution/=2.54; + image->y_resolution/=2.54; +@@ -4168,7 +4173,7 @@ MagickExport MagickBooleanType SyncImage + } + case PixelsPerCentimeterResolution: + { +- if (image_info->units == PixelsPerInchResolution) ++ if (units == PixelsPerInchResolution) + { + image->x_resolution*=2.54; + image->y_resolution*=2.54; +@@ -4178,7 +4183,7 @@ MagickExport MagickBooleanType SyncImage + default: + break; + } +- image->units=image_info->units; ++ image->units=units; + } + option=GetImageOption(image_info,"white-point"); + if (option != (const char *) NULL) diff --git a/ImageMagick.changes b/ImageMagick.changes index 3229f8d..9dc42fe 100644 --- a/ImageMagick.changes +++ b/ImageMagick.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Apr 26 13:30:55 CEST 2010 - pgajdos@suse.cz + +- fixed units in the output [bnc#598714] + * units.patch + ------------------------------------------------------------------- Wed Apr 7 14:51:13 CEST 2010 - ro@suse.de diff --git a/ImageMagick.spec b/ImageMagick.spec index 9c49e65..7b8e34e 100644 --- a/ImageMagick.spec +++ b/ImageMagick.spec @@ -40,6 +40,7 @@ Source2: xtp-%{xtp_version}.tar.bz2 Source3: baselibs.conf Patch1: ImageMagick-%{version}-examples.patch Patch2: ImageMagick-%{version}-doc.patch +Patch3: ImageMagick-%{version}-units.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %package -n perl-PerlMagick @@ -117,6 +118,7 @@ rm -rf xtp-%{xtp_version} %setup -n ImageMagick-%{source_version} -b 2 %patch1 %patch2 +%patch3 -p1 %build %define system_ltdl 0