Bug 690640 - Darkness of text in tif converted from pdf
Summary: Darkness of text in tif converted from pdf
Status: NOTIFIED WORKSFORME
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Text (show other bugs)
Version: 8.63
Hardware: Other Linux
: P2 major
Assignee: Ray Johnston
URL:
Keywords:
Depends on: 690521
Blocks:
  Show dependency tree
 
Reported: 2009-07-20 09:43 UTC by Robin Capone
Modified: 2011-09-18 21:46 UTC (History)
0 users

See Also:
Customer: 200
Word Size: ---


Attachments
okay.tif (118.46 KB, image/tiff)
2009-07-20 11:20 UTC, Robin Capone
Details
needswork.tif (124.60 KB, image/tiff)
2009-07-20 11:21 UTC, Robin Capone
Details
port.pdf (5.83 KB, application/pdf)
2009-07-20 11:21 UTC, Robin Capone
Details
good.tiff (30.23 KB, image/tiff)
2009-07-20 11:47 UTC, Ray Johnston
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Capone 2009-07-20 09:43:04 UTC
Hi,

You've helped me with image quality for a client
recently.  With the improved quality we lost some
darkness of the text.  The customer accepted the
change in the text but, now wants it darker.

For the text darkness I have the following in
gs_init.ps:
/show {
  dup gsave 1 0 idtransform rmoveto //show grestore
  dup gsave 1 1 idtransform rmoveto //show grestore
  dup gsave 0 1 idtransform rmoveto //show grestore
  //show
} odef

Worked great  until I added the following
to the conversion command for image quality:
-Ilib stocht.ps -c "{ 2.8 exp } settransfer << /HalftoneMode 1 >> setuserparams 

Thanks,
Robin
Comment 1 Ray Johnston 2009-07-20 11:12:07 UTC
Please attach a file (or if it is the same as for bug 690521, let us know).

Also please describe ALL of the command line options used for the conversion --
resolution, -sDEVICE= are the most critical for us to reproduce this.

If you can also attach a sample of what you are getting, and describe the
improvement you'd like and identify that area in the sample, that would help
us in uderstanding your requirements.
Comment 2 Robin Capone 2009-07-20 11:20:47 UTC
Created attachment 5225 [details]
okay.tif

Converted document with good text darkness
Comment 3 Robin Capone 2009-07-20 11:21:27 UTC
Created attachment 5226 [details]
needswork.tif

Converted document with too light text
Comment 4 Robin Capone 2009-07-20 11:21:59 UTC
Created attachment 5227 [details]
port.pdf

Original pdf
Comment 5 Robin Capone 2009-07-20 11:22:47 UTC
gs -r204x196 -sDEVICE=tiffg4 -o out.tif -Ilib stocht.ps -c \"{2.8 exp }
settransfer << /HalftoneMode 1 >> setuserparams \" -sPAPERSIZE=letter -dQUIET
-dNOPAUSE  -f  inputfile
Comment 6 Ray Johnston 2009-07-20 11:47:41 UTC
Created attachment 5228 [details]
good.tiff

I think the problem is the placement of the /show patch in gs_init.ps

I placed it immediately before:

% Load the initialization files for optional features.
%% Replace 4 INITFILES
systemdict /INITFILES known
 { INITFILES { dup runlibfile VMDEBUG } forall
 }
if

and my results are attached. If the /show is changed later, then it may have
already been bound into some procedures (such as the PDF interp).
Comment 7 Ray Johnston 2009-07-20 11:48:47 UTC
With proper placement of the modification to the show operator, this works for
me (see good.tiff http://bugs.ghostscript.com/attachment.cgi?id=5228&action=view )
Comment 8 Robin Capone 2009-07-20 13:01:19 UTC
Your version looks good but, no change for me when I 
move /show code.  The only other change I've made to 
ps files is:

/BT {
  % PATCH TO APPLY A TRANSFER FUNCTION TO TEXT
  userdict /TRsave currenttransfer put
  { 0.85 gt { 1 } { 0 } ifelse } settransfer
  % END PATCH
 ...
/ET {
  % PATCH TO RESTORE the NON-TEXT TRANSFER FUNCTION
  userdict /TRsave get settransfer
  % END PATCH
...
} bdef

to file pdf_ops.ps

Comment 9 Robin Capone 2009-07-20 13:03:39 UTC
Do I need to reboot or restart something after the change?
Comment 10 Marcos H. Woehrmann 2011-09-18 21:46:14 UTC
Changing customer bugs that have been resolved more than a year ago to closed.