Summary: | Output Page quality image (differently sized background, foreground and mask) | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | alex.farlie |
Component: | General | Assignee: | Default assignee <ghostpdl-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alex.farlie, sphinx.pinastri |
Priority: | P4 | ||
Version: | 9.52 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Customer: | Word Size: | --- | |
Attachments: |
Simplified sample file: a6.pdf
a6.jpg |
Description
alex.farlie
2020-07-01 19:40:55 UTC
Created attachment 19410 [details]
Simplified sample file: a6.pdf
This is a simplified page 9 of the sample file.
A high quality, 150 dpi, anti-aliased image can be produced by Ghostscript with the following command line:
~/ghostpdl/debugbin/gs -r600 -sDEVICE=tiffscaled24 -dDownScaleFactor=4 -o hifi.tiff a6.pdf
Ghostscript has no downscaling options for other devices, but TIFF can be converted to other raster formats using "convert".
Since Peter's suggestion produces a high quality result, closing this bug as FIXED, assuming that the Phabricator users can use this approach. I will mention that 'convert' (part of ImageMagick) can scale as well as convert formats, but since this requires creation of an intermediate file as well, it uses more disk space for the intermediate file than the approach Peter suggests. I also suggest that Artifex's other Open Source product, Mupdf, can be used to produce a high quality document in JPEG format in a single step: mutool draw -r150 -o a6.jpg a6.pdf The mupdf engine (mutool is part of the Mupdf package), anti-aliases internally by default so the results are similar to using -dDownScalFactor with Ghostscript. Created attachment 19766 [details]
a6.jpg
Output from:
mutool draw -r150 -o a6.jpg a6.pdf
|