Bug 691341 - PNG Image Quality Severely Reduced
Summary: PNG Image Quality Severely Reduced
Status: RESOLVED FIXED
Alias: None
Product: GhostXPS
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: PC All
: P4 normal
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-26 13:40 UTC by Noam
Modified: 2010-05-26 14:01 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
Original XPS File (189.86 KB, application/vnd.ms-xpsdocument)
2010-05-26 13:40 UTC, Noam
Details
Original PNG Image (104.77 KB, image/png)
2010-05-26 13:41 UTC, Noam
Details
Resulting PDF (264.14 KB, application/pdf)
2010-05-26 13:42 UTC, Noam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Noam 2010-05-26 13:40:36 UTC
Created attachment 6323 [details]
Original XPS File

Hi,

I'm having problems converting XPS files to PDF using GhostXPS. I've downloaded and built the GhostPDL project on both Windows7 and Ubuntu 10.04. In both cases, trying to convert XPS files that have embedded PNG images results in a dramatic loss of quality, to the point where the image becomes illegible. 

I'm running gxps with the following parameters:

gxps.exe -sDEVICE=pdfwrite-dNOPAUSE -sOutputFile="C:\temp\docx03-v7.pdf" "C:\temp\docx03-v7.xps"

I've also tried setting other parameters, including -dAutoFilterColorImages=false, but it doesn't seem to help.

I've tried to dive into the code, but for all my efforts, I can't seem to fathom what's going on. Not sure if the problem is in xpspng.c, xpsimage.c, somewhere else, or if there really isn't any problem and I'm somehow misusing the app.

Any help would be appreciated!

Thanks,
Noam
Comment 1 Noam 2010-05-26 13:41:30 UTC
Created attachment 6324 [details]
Original PNG Image
Comment 2 Noam 2010-05-26 13:42:13 UTC
Created attachment 6325 [details]
Resulting PDF
Comment 3 Ken Sharp 2010-05-26 14:01:46 UTC
This was caused by a poor selection of defaults for the pdfwrite device, in particular the downsampling of all images to 72 dpi, and has since been addressed (revision 11164). More information and a patch to resolve the issue can be found here:

http://ghostscript.com/pipermail/gs-cvs/2010-May/010936.html

I converted the XPS file to PDF using your command line and the resulting PDF file looks OK to me, comparable with the original XPS file, and not the horrible mess that the original defaults resulted in.