Bug 691807 - Undesirable black lines appear in output
Summary: Undesirable black lines appear in output
Status: NOTIFIED INVALID
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Graphics Library (show other bugs)
Version: master
Hardware: PC All
: P1 enhancement
Assignee: Robin Watts
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-30 23:18 UTC by Marcos H. Woehrmann
Modified: 2011-10-02 02:35 UTC (History)
0 users

See Also:
Customer: 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 2010-11-30 23:18:38 UTC
The customers reports and I've verified when the attached file is converted to tiffg4 by Ghostscript thin horizontal lines appear in the output image.  These lines also appear when the image is exported to monochrome tiff by Adobe Acrobat 9.4.0 but do not appear when viewing the image on the screen.  The customer would prefer if these lines were not in the output .

The command line I'm using for testing:

  bin/gs-sDEVICE=tiffg4 -o test.tif -r300 ./nw_fieldhouse_balcony.pdf
Comment 2 Robin Watts 2010-12-09 19:36:13 UTC
This file starts out by drawing a rectangle, then overlays it with an image.
It then repeats this up the page.

Each of the horizontal lines seen across the page is due to the rectangles projecting outside the images.

The reason for this is the way the postscript imaging model handles the filling of pixels; specifically when scan converting vector graphics, we fill any pixel that is touched (by however small an amount), whereas when scan converting images we only fill pixels if the image covers the centre of the pixel.

As a test, if you create a file zerofilladjust.ps that contains the following:

0 .setfilladjust

and then pass this to ghostscript before starting the render as follows:

  bin/gs -sDEVICE=tiffg4 -o test.tif -r300 zerofilladjust.ps nw_fieldhouse_balcony.pdf

then the problem goes away. This command is a ghostscript specific extension that forces vectors to be rendered using the same 'centre of pixel' rule that images use. As such this means that images and vectors match up and no horizontal lines are seen.

This is NOT a general purpose solution though, as it will cause other problems (like thin lines disappearing completely).

As such there isn't much we can do about this problem; the short answer is that the input file is broken. I am therefore closing this bug. Please reopen it if you have any other questions or comments.
Comment 3 Robin Watts 2010-12-09 19:36:39 UTC
Apologies. That should have been resolved/invalid.