Bug 691898 - The PDF to tiff conversion generates bad quality for a specific PDF file
Summary: The PDF to tiff conversion generates bad quality for a specific PDF file
Status: RESOLVED INVALID
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Images (show other bugs)
Version: 9.00
Hardware: PC Linux
: P4 major
Assignee: Alex Cherepanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-19 11:04 UTC by irc_ro
Modified: 2011-01-20 11:01 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
The pdf with the issue (134.70 KB, application/pdf)
2011-01-20 10:33 UTC, irc_ro
Details
The output obtained (92.01 KB, application/pdf)
2011-01-20 10:37 UTC, irc_ro
Details
The output in tiff format (71.89 KB, image/tiff)
2011-01-20 10:57 UTC, irc_ro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description irc_ro 2011-01-19 11:04:16 UTC
After i use the following commands:

1. /usr/local/bin/gs -q -sDEVICE='tiffg3' -dPARANOIDSAFER -dBATCH -sPAPERSIZE='a4' -dFIXEDMEDIA -dNOPAUSE -r'204x169' -sOutputFile=fax.tif -f fax.pdf

2. tiffinfo fax.tif

the output obtained is:

TIFF Directory at offset 0x8 (8)
  Subfile Type: multi-page document (2 = 0x2)
  Image Width: 1728 Image Length: 1976
  Resolution: 204, 169 pixels/inch
  Bits/Sample: 1
  Compression Scheme: CCITT Group 3
  Photometric Interpretation: min-is-white
  FillOrder: msb-to-lsb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 4969
  Planar Configuration: single image plane
  Page Number: 0-0
  Software: GPL Ghostscript  9.00
  DateTime: 2011:01:19 12:33:20
  Group 3 Options: EOL padding (4 = 0x4)

The tiff file obtained has poor quality and it reports 2 pages, but i have only one page. The original pdf file contains one page.

Any ideas?
Comment 1 Chris Liddell (chrisl) 2011-01-19 11:15:27 UTC
Without a file demonstrating the problem, it's difficult to even guess.
Comment 2 Alex Cherepanov 2011-01-20 03:09:54 UTC
Unfortunately, nothing can be done without a sample PDF file.
Feel free to attach the file and re-open this bug report.
Comment 3 irc_ro 2011-01-20 10:33:49 UTC
Created attachment 7144 [details]
The pdf with the issue

Please use 'Fax sent.pdf' as an argument
Comment 4 irc_ro 2011-01-20 10:37:47 UTC
Created attachment 7145 [details]
The output obtained
Comment 5 Ken Sharp 2011-01-20 10:49:05 UTC
(In reply to comment #4)
> Created an attachment (id=7145) [details]
> The output obtained

This appears to be a PDF file, not a TIFF file....
Comment 6 irc_ro 2011-01-20 10:57:17 UTC
Created attachment 7146 [details]
The output in tiff format

 /usr/local/bin/gs -q -sDEVICE='tiffg3' -dSAFER -dBATCH -sPAPERSIZE='a4' -dFIXEDMEDIA -dNOPAUSE -r'204x169' -sOutputFile=fax_sent.tif -f 'Fax sent.pdf'
Comment 7 Ken Sharp 2011-01-20 10:59:55 UTC
The original is a colour PDF file, fax is a low resolution 1-bit monochrome device. So the colour is halftoned to give a visual representation of gray using only black and white pixels. The gray value is an approximation of the luminance of the original colour.

At low resolution halftoning does of course result in the individual monochrome pixels becoming more obvious.

The original is itself a scanned document (or possibly screen capture), and appears to use a number of images, some using JPEG compression. The artefacts caused by JPEG compression result in the occasional single pixels scattered across the TIFF output.

You could use the new (9.01, unreleased code) tiffscaled device to produce output at the required fax resolution. When scaling images down to a lower resolution this does a better job of generating pleasing output and *may* improve the output of your file.

However this does not appear to be a bug. The degradation in quality is due to the limitations (colour/resolution) of the selected output.
Comment 8 irc_ro 2011-01-20 11:01:37 UTC
Thanks