Bug 690835 - Images rendered badly
Summary: Images rendered badly
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Images (show other bugs)
Version: master
Hardware: All All
: P1 normal
Assignee: Ray Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-20 22:31 UTC by Marcos H. Woehrmann
Modified: 2011-09-18 21:47 UTC (History)
0 users

See Also:
Customer: 850 531
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos H. Woehrmann 2009-10-20 22:31:25 UTC
The customer reports and I've verified that Ghostscript renders the attached PDF file with damaged 
images.  This is a regression, gs8.54 renders the file correctly but gs8.70 and gs head do not.  The 
exact revision that broke this is hard to narrow down:

8527: works
8528: does not build
8529: does not build
8530: does not build
8531: locks up
...
8542: locks up
8543: broken images

The command line I'm using for testing:

  bin/gs -sDEVICE=ppmraw -o test.ppm ./SB_A0_x1_arctic_700.pdf
Comment 1 Marcos H. Woehrmann 2009-10-20 22:32:10 UTC
Created attachment 5515 [details]
SB_A0_x1_arctic_700.pdf
Comment 2 Ray Johnston 2009-10-21 09:06:06 UTC
The suspected changes is:

r8539 | leonardo | 2008-02-22 12:18:08 -0800 (Fri, 22 Feb 2008) | 32 lines
Fix (images) : Improve coordinate precision when scaling an image (continued 6).

Of course, this is part 6 of the changes, so it might not be directly related
to this change.

Since these changes are primarily in the image interpolation, I tried with
-dNOINTERPOLATE and the image is correct. This is a work around until the bug
can be fixed.
Comment 3 Alex Cherepanov 2009-10-24 15:27:15 UTC
With wts devices removed and patch for the rev. 8543 back-ported I was able to
build revs. 8528, 8529 and run the sample file.

The former works OK but the latter has broken images.
So it's rev. 8529 .
Comment 4 Alex Cherepanov 2009-10-27 09:02:50 UTC
Created attachment 5558 [details]
dogs-i4.pdf  --  simplified sample file

This is a simplified sample file that stretches an an interpolated image to the

whole page and places red background under the image.

At 300 dpi Ghostscript renders it as a red page with 2 image stripes at the
bottom of the page.
Comment 5 Ray Johnston 2009-12-01 22:45:03 UTC
This is a problem in the y positioning of interpolated images when the
image is bottom up -- an extra inversion of a sign moving the image down
past the bottom of the band (for all but the bottom band). Sometimes the
image would be partly visible, shifted down.

I am testing a patch for this now.
Comment 6 Ray Johnston 2009-12-01 23:01:19 UTC
Fixed rev 10542. This is a simple patch and can easily be applied to older
versions of gxiscale.c
Comment 7 Marcos H. Woehrmann 2011-09-18 21:47:17 UTC
Changing customer bugs that have been resolved more than a year ago to closed.