Your message dated Sun, 6 Feb 2011 17:23:58 +0100
with message-id <[email protected]>
and subject line Done: gs-aladdin: ImageType3 renders incorrectly in certain 
cases.  Patch included.
has caused the Debian Bug report #192640,
regarding gs-aladdin: ImageType3 renders incorrectly in certain cases.  Patch 
included.
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
192640: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=192640
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: gs-aladdin
Version: 7.04-2
Severity: normal


The following postscript renders incorrectly in every version of
ghostscript I have tried it on, 7.04 (aladdin), 7.05.06 (ESP) and 7.06
(gnu):  It leaves a blank line on line 258 of the output, due to the
mask data and image daa being out of sync (and scaled differently)

%!PS-Adobe-3.0
%
% This program demonstrates a bug in Ghoscript's Masked Image rendering.
% To reproduce the bug, use the following command-line:
%
%   gs -r371 -g100x800 gsbug.ps
%
% You should notice a one-pixel horizontal white line near the top of
% the picture.  To save the bad result to a file, use the following
% command-line:
%
%   gs -q -r371 -g100x800 -sDEVICE=ppmraw -dBATCH -dNOPAUSE 
-sOutputFile=gsbug.ppm gsbug.ps
%

/ImageDataDictionary <<
  /ImageType 1
  /Width 1
  /Height 1000
  /BitsPerComponent 8
  /DataSource <ff108080>
  /MultipleDataSources false
  /ImageMatrix [ 1 0 0 -1483 0 1000 ]
  /Decode [ 0 1 0 1 0 1 ]
>> def

/ImageMaskDictionary <<
  /ImageType 1
  /Width 1
  /Height 1000
  /BitsPerComponent 8
  /MultipleDataSources false
  /ImageMatrix [ 1 0 0 -1483 0 1000 ]
  /Decode [ 1 0 ]
>> def

/MaskedImageDictionary <<
  /ImageType 3
  /InterleaveType 1
  /MaskDict ImageMaskDictionary
  /DataDict ImageDataDictionary
>> def

[100 0 0 -1484.00012 0 1000] setmatrix
/DeviceRGB setcolorspace
MaskedImageDictionary image

showpage

The following patch (made by Jeong Kim from ghostscript.com) fixes
the problem:

Log:
When scaling factors of /ImageMatrix in a image mask for ImageType3 are
negative, translation offset values for image mask rendering are
incorrect and it makes abnormal output (eg. white lines).
This patch fixes this bug #686843. Thanks to Len Sorensen for the analysis.

diff -C2 -r1.11 gximage3.c
*** src/gximage3.c      25 Oct 2002 00:27:10 -0000      1.11
--- src/gximage3.c      9 May 2003 05:47:30 -0000
***************
*** 328,334 ****
        (code = gs_bbox_transform(&mrect, &mat, &mrect)) < 0
        )
!       return code;
!     origin.x = (int)floor(mrect.p.x);
!     origin.y = (int)floor(mrect.p.y);
      code = make_mid(&mdev, dev, (int)ceil(mrect.q.x) - origin.x,
                    (int)ceil(mrect.q.y) - origin.y, mem);
--- 328,336 ----
        (code = gs_bbox_transform(&mrect, &mat, &mrect)) < 0
        )
!       return code;
!
!     origin.x = (mrect.p.x < 0) ? (int)ceil(mrect.p.x) : (int)floor(mrect.p.x);
!     origin.y = (mrect.p.y < 0) ? (int)ceil(mrect.p.y) : (int)floor(mrect.p.y);
!
      code = make_mid(&mdev, dev, (int)ceil(mrect.q.x) - origin.x,
                    (int)ceil(mrect.q.y) - origin.y, mem);

The line numbers may be slightly off, but the some code change is needed
in all ghostscript versions to fix the issue.

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux arrow 2.4.20-p2-smp-og #1 SMP Tue Dec 17 10:35:41 EST 2002 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages gs-aladdin depends on:
ii  gs-common                     0.3.3.1    Common files for different Ghostsc
ii  libc6                         2.3.1-17   GNU C Library: Shared libraries an
ii  libpaper1 [libpaperg]         1.1.13     Library for handling paper charact
ii  libpaperg                     1.1.13     Library for handling paper charact
ii  libpng2                       1.0.15-2   PNG library, older version - runti
ii  xlibs                         4.2.1-6    X Window System client libraries
ii  zlib1g                        1:1.1.4-11 compression library - runtime

-- no debconf information



--- End Message ---
--- Begin Message ---
Package: gs-aladdin

Closed since a long time



--- End Message ---

Reply via email to