Bug 688540 - Incorrect halftone rendering with a small halftone cache
Summary: Incorrect halftone rendering with a small halftone cache
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Graphics Library (show other bugs)
Version: master
Hardware: PC Windows XP
: P3 normal
Assignee: Ray Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-05 05:55 UTC by leonardo
Modified: 2016-04-29 16:39 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments
Testform.v1.0.2.pdf.pdf.pkmraw.300.0.gz (790.61 KB, application/octet-stream)
2006-02-05 06:05 UTC, leonardo
Details
out6480.ppm.gz (1.04 MB, application/octet-stream)
2006-02-05 06:08 UTC, leonardo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description leonardo 2006-02-05 05:55:48 UTC
This problem is discovered by the nightly regression test on 2006-01-22 :
the file "pdfwrite Testform.v1.0.2.pdf (pkmraw/300/noband)" appears different. 
Analyzing it so far, the old (baseline) raster appears incorrect. 
The related patch
http://ghostscript.com/pipermail/gs-cvs/2006-January/006240.html
simply increases the halftone cache size :

-#define max_tile_bytes_LARGE 4096
+#define max_tile_bytes_LARGE 65536

Since the cahce size must have no effect on raster, I believe that I observe a 
Ghostscript bug, which is visible with a small halftone cache only.
Comment 1 leonardo 2006-02-05 06:05:50 UTC
Created attachment 1996 [details]
Testform.v1.0.2.pdf.pdf.pkmraw.300.0.gz

The old (incorrect) raster, copied from peeves:~regression/regression/raster
Comment 2 leonardo 2006-02-05 06:08:42 UTC
Created attachment 1997 [details]
out6480.ppm.gz

A new raster, created on peeves with the revision 6480.
Here is how I created it :

svn checkout  --username leonardo -r 6480 
http://svn.ghostscript.com:8080/ghostscript/trunk/gs/ gs
cd gs
./autogen.sh
make
cd ..
rename gs gs6480
gs6480/bin/gs -Igs6480/lib:/home/regression/fonts/ -dBATCH -dNOPAUSE
-sDEVICE=pdfwrite -sOutputFile=out6480.pdf -c false 0 startjob pop -f -
<~regression/comparefiles/Testform.v1.0.2.pdf
gs6480/bin/gs -Igs6480/lib:/home/regression/fonts/ -r300 -dBATCH -dNOPAUSE
-sDEVICE=pkmraw -sOutputFile=out6480.ppm out6480.pdf
gzip out6480.ppm
Comment 3 leonardo 2006-02-05 06:11:00 UTC
The revision 6479 creates a wrong raster, same as 
Testform.v1.0.2.pdf.pdf.pkmraw.300.0.gz attached to here.

Thus, we need to debug the revision 6479, and port the patch to the current 
HEAD.
 
Comment 4 Michael Vrhel 2016-04-29 09:51:20 UTC
I am not seeing any issues with this.  Creating pkmraw from the pdfwrite output looks the same to me as creating pkmraw from the original file.   Igor does discuss that the issue is from changing max_ht_cached_tiles_LARGE (which is currently set to 8192).  I am going to pass this one off to Ray to get his comments.
Comment 5 Ray Johnston 2016-04-29 16:39:25 UTC
There have been several fixes for the halftoning and cache handling, and I
have tested this with cache sizes of 4096 and 256 and there are no problems.