Summary: | Dropouts in raster at 200 DPI | ||
---|---|---|---|
Product: | GhostPCL | Reporter: | Marcos H. Woehrmann <marcos.woehrmann> |
Component: | PCL interpreter | Assignee: | Ray Johnston <ray.johnston> |
Status: | NOTIFIED FIXED | ||
Severity: | normal | CC: | robin.watts |
Priority: | P2 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | Linux | ||
Customer: | 780 | Word Size: | --- |
Attachments: |
RFW17.tmp
screenshot.png simplified raster only file |
Description
Marcos H. Woehrmann
2008-09-19 10:15:46 UTC
Created attachment 4407 [details]
RFW17.tmp
Created attachment 4410 [details]
screenshot.png
The left portion was rendered at 300 DPI and the right at 200 DPI.
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.
assigning to ray to investigate the downscaling filter. 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. 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). 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. |