For Programmers: Free Programming Magazines  


Home > Archive > PostScript > August 2007 > transfer function ignored in OS X Preview.app ?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author transfer function ignored in OS X Preview.app ?
François Robert

2007-08-28, 7:11 pm

Dear NG
It seems that Mac OS X embedded version of Distiller (used by
Preview.app) does not honor the transfer function. I tried the following
:
%!PS
100 100 scale
8 8 8 [8 0 0 -8 0 8]
<FFEEDDCCBBAA99887766554433221100>
image

0 1.5 translate
0 setgray
0 0 1 1 rectfill

[ currenttransfer /exec cvx
1 /exch cvx /sub cvx
] cvx bind dup == settransfer

currenttransfer ==

1.5 -1.5 translate

8 8 8 [8 0 0 -8 0 8]
<FFEEDDCCBBAA99887766554433221100>
image

0 1.5 translate
0 setgray
0 0 1 1 rectfill

showpage
%%EOF

With Distiller 7 and Ghostscript 8.54, it looks as expected (the
right-hand image and patch are the negative of the left-hand ones).
With Preview.app 3.0.6 (build 409) from OS X 10.4.6, the left-hand and
the right-hand drawing are identical, even though there is an inverting
transfer function in force.

Is there some parameter to set somewhere for Preview.app to honor the
transfer function ? Or is this simply a bug ?

________________________________________
________________
François Robert
François Robert

2007-08-28, 7:11 pm

In article <moc.xeta-79EBA3.20093828082007@powernews.iol.it>,
François Robert <moc.xeta@trebor.siocnarf> wrote:

> Is there some parameter to set somewhere for Preview.app to honor the
> transfer function ? Or is this simply a bug ?


FWIW, I found that PSNormalizer.framework has a PS startup file located
in :
/System/Library/PrivateFrameworks/PSNormalizer.framework/Versions/A/Resou
rces/startupNORM.ps.

At the end of this file, one finds :
<</AutoPositionEPSFiles true /AutoRotatePages /All >> setdistillerparams

Based on the Acrobat Distiller Parameters documentation
(http://partners.adobe.com/public/de.../pdf/pdf_creati
on_apis_and_specs/DistillerParameters.pdf), I changed that to :
<<
/AutoPositionEPSFiles true
/AutoRotatePages /All
/TransferFunctionInfo /Apply[color=darkred]

and that fixed the issue. However, the default value (/Preserve) for
/TransferFunctionInfo is apparently either not honored or PDF transfer
functions are not understood by the PDF viewer component of Preview.app.

________________________________________
________________
François Robert
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com