I have a ps which is essentially a big color image, and both ps2pdf -dAutoFilterColorImages=false myfile.ps and ps2pdf -dAutoFilterColorImages=true myfile.ps DCTEncode the image (and thus lead to quality loss). I have to do ps2pdf -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode myfile.ps to have the desired lossless compression. This is somewhat different from expected, reading the documentation (ps2pdf.htm): ================= (note 1) Currently, AutoFilterxxxImages doesn't examine the image to decide between JPEG and LZW or Flate compression: it always uses Flate compression. If you want to force JPEG compression, use -dAutoFilterxxxImages=false. ================= I was expecting FlateEncode to be on when AutoFilterColorImages=true (the default). file to follow.
Created attachment 2337 [details] ps file gzip'ed ps file gzip'ed for which I had the problem with reading the docs.
If my reading of lib/gs_pdfwr.ps is correct, the defaults are: << /AutoFilterColorImages true /MonoImageFilter /CCITTFaxEncode /ColorImageFilter /DCTEncode >> whereas my understanding of what the doc says the default (not true) are these: << /AutoFilterColorImages true /MonoImageFilter /FlateEncode /ColorImageFilter /FlateEncode >>
1. The comment#2 is incorrect. Both gs/doc/Ps2pdf.htm and "Acrobat Distiller Parameters October 2, 2005 Adobe Solutions Network — http://partners.adobe.com" specify the default value for ColorImageFilter is DCTEncode. 2. In gs/doc/Ps2pdf.htm "note 1" appears obsolete. I'll remove it. 3. When AutoFilterColorImages=true, the filter is being choosed automatically. Ghostscript chooses DCTDecode and Distiller chooses DCTDecode. Thus Ghostscript's behavior is same as Adobe. 4. I agree that a looseless filetr may be better for this image for some purposes, when the text contrast is highly important. But for outher purposes, when the document size is more important, DCTEncode is preferrable. Thus there is not enough reason to improve the automatic filter choice.
Patch to HEAD : http://ghostscript.com/pipermail/gs-cvs/2006-August/006744.html
I was just refering to gs/doc/Ps2pdf.htm "note 1" on "what the doc says" in comment 2 - anyway, note 1 was wrong and removal/rewrite is fine.