- fixed units in the output [bnc#598714]

* units.patch

OBS-URL: https://build.opensuse.org/package/show/graphics/ImageMagick?expand=0&rev=28
This commit is contained in:
Petr Gajdos 2010-04-26 11:40:16 +00:00 committed by Git OBS Bridge
parent 69637f4fd6
commit a5da976dac
3 changed files with 63 additions and 0 deletions

View File

@ -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)

View File

@ -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 Wed Apr 7 14:51:13 CEST 2010 - ro@suse.de

View File

@ -40,6 +40,7 @@ Source2: xtp-%{xtp_version}.tar.bz2
Source3: baselibs.conf Source3: baselibs.conf
Patch1: ImageMagick-%{version}-examples.patch Patch1: ImageMagick-%{version}-examples.patch
Patch2: ImageMagick-%{version}-doc.patch Patch2: ImageMagick-%{version}-doc.patch
Patch3: ImageMagick-%{version}-units.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%package -n perl-PerlMagick %package -n perl-PerlMagick
@ -117,6 +118,7 @@ rm -rf xtp-%{xtp_version}
%setup -n ImageMagick-%{source_version} -b 2 %setup -n ImageMagick-%{source_version} -b 2
%patch1 %patch1
%patch2 %patch2
%patch3 -p1
%build %build
%define system_ltdl 0 %define system_ltdl 0