- fixed jpeg compression of grayscale tif format [bnc#615223]

OBS-URL: https://build.opensuse.org/package/show/graphics/ImageMagick?expand=0&rev=32
This commit is contained in:
Petr Gajdos 2010-06-22 16:39:48 +00:00 committed by Git OBS Bridge
parent 4223783a10
commit 2f3f880116
3 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,39 @@
Index: ImageMagick-6.6.1-0/coders/tiff.c
===================================================================
--- ImageMagick-6.6.1-0.orig/coders/tiff.c
+++ ImageMagick-6.6.1-0/coders/tiff.c
@@ -2668,22 +2668,19 @@ static MagickBooleanType WriteTIFFImage(
image->endian=MSBEndian;
if ((int) (*(char *) &lsb_first) != 0)
image->endian=LSBEndian;
- if ((compress_tag == COMPRESSION_JPEG) && (photometric != PHOTOMETRIC_RGB))
- compress_tag=COMPRESSION_NONE;
+ if ((compress_tag == COMPRESSION_CCITTFAX3) &&
+ (photometric != PHOTOMETRIC_MINISWHITE))
+ {
+ compress_tag=COMPRESSION_NONE;
+ endian=FILLORDER_MSB2LSB;
+ }
else
- if ((compress_tag == COMPRESSION_CCITTFAX3) &&
- (photometric != PHOTOMETRIC_MINISWHITE))
- {
- compress_tag=COMPRESSION_NONE;
- endian=FILLORDER_MSB2LSB;
- }
- else
- if ((compress_tag == COMPRESSION_CCITTFAX4) &&
- (photometric != PHOTOMETRIC_MINISWHITE))
- {
- compress_tag=COMPRESSION_NONE;
- endian=FILLORDER_MSB2LSB;
- }
+ if ((compress_tag == COMPRESSION_CCITTFAX4) &&
+ (photometric != PHOTOMETRIC_MINISWHITE))
+ {
+ compress_tag=COMPRESSION_NONE;
+ endian=FILLORDER_MSB2LSB;
+ }
(void) TIFFSetField(tiff,TIFFTAG_COMPRESSION,compress_tag);
(void) TIFFSetField(tiff,TIFFTAG_FILLORDER,endian);
(void) TIFFSetField(tiff,TIFFTAG_BITSPERSAMPLE,quantum_info->depth);

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jun 22 17:37:54 CEST 2010 - pgajdos@suse.cz
- fixed jpeg compression of grayscale tif format [bnc#615223]
------------------------------------------------------------------- -------------------------------------------------------------------
Mon May 10 15:19:58 UTC 2010 - aj@suse.de Mon May 10 15:19:58 UTC 2010 - aj@suse.de

View File

@ -43,6 +43,7 @@ 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 Patch3: ImageMagick-%{version}-units.patch
Patch4: ImageMagick-%{version}-grayscale-tiff-jpeg.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%package -n perl-PerlMagick %package -n perl-PerlMagick
@ -121,6 +122,7 @@ rm -rf xtp-%{xtp_version}
%patch1 %patch1
%patch2 %patch2
%patch3 -p1 %patch3 -p1
%patch4 -p1
%build %build
%define system_ltdl 0 %define system_ltdl 0