Bug 690085 - Dropouts in raster at 200 DPI
Summary: Dropouts in raster at 200 DPI
Status: NOTIFIED FIXED
Alias: None
Product: GhostPCL
Classification: Unclassified
Component: PCL interpreter (show other bugs)
Version: master
Hardware: PC Linux
: P2 normal
Assignee: Ray Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-19 10:15 UTC by Marcos H. Woehrmann
Modified: 2011-10-02 02:35 UTC (History)
1 user (show)

See Also:
Customer: 780
Word Size: ---


Attachments
RFW17.tmp (951.26 KB, application/octet-stream)
2008-09-19 10:16 UTC, Marcos H. Woehrmann
Details
screenshot.png (3.92 KB, image/png)
2008-09-19 10:25 UTC, Marcos H. Woehrmann
Details
simplified raster only file (163.23 KB, application/octet-stream)
2008-09-25 12:46 UTC, Henry Stiles
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos H. Woehrmann 2008-09-19 10:15:46 UTC
There are dropouts in the output at 200 DPI in the attached file.

The command line I'm using for testing:

  pcl6 -sDEVICE=pbmraw -sOutputFile=test.pbm -dNOPAUSE -r200 RFW17.tmp
Comment 1 Marcos H. Woehrmann 2008-09-19 10:16:08 UTC
Created attachment 4407 [details]
RFW17.tmp
Comment 2 Marcos H. Woehrmann 2008-09-19 10:25:38 UTC
Created attachment 4410 [details]
screenshot.png

The left portion was rendered at 300 DPI and the right at 200 DPI.
Comment 3 Henry Stiles 2008-09-25 12:46:00 UTC
Created attachment 4425 [details]
simplified raster only file

Running with interpolation (s_ISpecialDownScale_template) recovers some
features however there is a horizontal line missing on the first parallelogram.


./pcl6 -dDOINTERPOLATE -dNOPAUSE -r200 -sDEVICE=pbmraw
-sOutputFile=rfw200_interp.pbm ~/Desktop/RFW17_RasterOnly.tmp

compare to 600 dpi to see the dropped line.
Comment 4 Henry Stiles 2008-09-25 12:48:38 UTC
assigning to ray to investigate the downscaling filter.
Comment 5 Ray Johnston 2009-06-16 10:17:04 UTC
creating a 'post processing' filter to downscale 1-bit output and implement
anti-dropout would be a useful thing for this type of application (creating
200 dpi 'fax' images from PCL files).

Since the output is usually TIFF (tiffpack or tiffg*), this could be an option
to that device, but if implemented correctly, it would be fairly easy to add
to other 1-bit devices.
Comment 6 Ray Johnston 2010-09-10 15:19:22 UTC
Regarding the third alternative, ghostscript has a 'stochastic threshold array',
that usually is available to PS (using lib/stocht.ps). This creates a large 
(167x167) threshold array that reasonably emulates error diffusion without the
CPU load that error diffusion imposes.

I just wanted to mention it in case the error diffusion works. Many of our FAX
customers converting PS and PDF use this, often combined with PS code that
changes to "transfer function" to darken gray text.

Converting the ht_stocht.ps (the actual threshold array data) to a 'C' style
threshold array halftone usable by PCL would not be difficult, and I assume
that Henry could point us to the text handling in PCL to allow text to be
darkened (without affecting images or other graphics) by calling the graphics
library 'gs_settransfer' function.

On the topic of the 'downsampling' filter that prevents dropout, I have done
that for customer 531 that had similar problems with dropout (in their case
it was scanned documents in PS that needed to be rendered at 600 dpi, but
they wanted to print at 300 dpi).
Comment 7 Robin Watts 2010-12-07 17:39:15 UTC
The simple answer to this bug is that rendering PCL at anything other than 600 dpi will always produce sub optimal results.

As such we've designed a new device, tiffscaled, to provide a way around these problems.

Rather than rendering at 200dpi, we would tell ghostscript to render at 600dpi, and then tell the tiffscaled device to scale down by a factor of 3. This downscale includes an error diffusion phase that ensures we lose as little data a possible - in particular it eliminates the possibility of dropouts.

So instead of using:

  pcl6 -sDEVICE=pbmraw -sOutputFile=test.pbm -dNOPAUSE -r200 RFW17.tmp

use:

  pcl6 -sDEVICE=tiffscaled -sOutputFile=test.tif -dNOPAUSE -r600 -dDownScaleFactor=3 RFW17.tmp

This produces a tif instead of a pbm of course, but I believe that's what the customer actually wants.

I am therefore closing this bug - please feel free to reopen it with additional information if you feel this does not address your concerns.