GNOME Bugzilla – Bug 319049
Suboptimal ghostscript antialiasing flags
Last modified: 2005-12-30 19:55:22 UTC
Currently, evince passes the following flags to Ghostscript for antialiasing: "-sDEVICE=x11alpha -dNOPLATFONTS". With these flags, Ghostscript does not antialias PostScript files that are in fact just 1-bit bitmaps with huge resolution. Suggestion: use "-sDEVICE=x11alpha -dNOPLATFONTS -dTextAlphaBits=4 -dGraphicsAplhaBits=4 -dDOINTERPOLATE" by default. Or make such flags configurable at runtime (for those who can't afford a CPU fast enough to handle -dDOINTERPOLATE smoothly). Other information: GGV allows one to configure Ghostscript flags at runtime, Evince doesn't.
Created attachment 53575 [details] Testcase This PostScript file is just a 1-bit 300-dpi bitmap in disguise. View it in GGV and in Evince.
Created attachment 53576 [details] Screenshot of Evince Evince doesn't antialias the image by default and cannot be configured to do so.
Created attachment 53577 [details] GGV renders the image fine GGV displays the image correctly once I go to Ghostscript configuration doalog and add -dDOINTERPOLATE -dTextAlphaBits=4 -dGraphicsAlphaBits=4. Relevant flag: -dDOINTERPOLATE Evince should provide the same quality by default.
Well, first of all I understand that selection of good options is a problem. But I am not sure what flags should we choose actually. Btw, can you measure the performance-loss caused by this change?
On my computer, I told gs to render the test file to png16m: time gs -sDEVICE=png16m -sOutputFile=junk%d.png -dNOPLATFONTS -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dBATCH -dSAFER -dNOPAUSE -dDOINTERPOLATE wp0w+.ps Results: With -dDOINTERPOLATE: 1.387s Without -dDOINTERPOLATE: 0.713s Without -dDOINTERPOLATE and alpha bits: 0.690s
Such slowdown is only relevant to huge bitmaps. On the standard tiger, I get: With -dDOINTERPOLATE: 0.669s Without -dDOINTERPOLATE: 0.673s Without -dDOINTERPOLATE and alpha bits: 0.515s
My results are even better, I have something like 1.0 0.95 0.92 It would be acceptable to make antialiasing options better. Moreover, one can change those options in configure. So this bug should be fixed.