Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #2214

Re: Ghostscript pickling settransfer

From ken <ken@spamcop.net>
Newsgroups comp.lang.postscript
Subject Re: Ghostscript pickling settransfer
Date 2015-04-15 08:15 +0100
Message-ID <MPG.2f98206fee6aa8149898e9@usenet.plus.net> (permalink)
References <96e660b0-b16f-46b9-8f27-a1245803224f@googlegroups.com>

Show all headers | View raw


In article <96e660b0-b16f-46b9-8f27-a1245803224f@googlegroups.com>, 
jdawiseman@gmail.com says...
> 
> In a thread entitled 'An empty correspondence with the CEO of Adobe Systems'
> https://groups.google.com/forum/#!topic/comp.lang.postscript/_yxo2ZDiUnU
> 
> JDAW wrote:
> > GhostScript ... encodes settransfer in a manner heeded by Acrobat
> > Reader but ignored by Mac Preview
> 
> Ken wrote:
> > If the settransfer is ignored by Mac Preview, even though its
> > valid, surely this is a problem with Mac Preview, not pdfwrite ?
> 
> and later wrote
> > FWIW, you are correct that Distiller is pickling the transfer funtion
> > into the colours in the PDF file, while Ghostscript is preserving the
> > transfer funtion.
> 
> 
> Please, good people of comp.lang.postscript, is there any way in PostScript to force Ghostscript to 'pickle' settransfer? Doing it in the system call to Ghostscript doesn't work for me: it has to be in the PostScript. Is that possible?


Possibly you could redefine setcolor, setgray, setrgbcolor, 
setcmykcolor, sethsbcolor. The modified operation could apply the 
transfer function when setting the color.

Of course you would also have to do this for image, colorimage, 
imagemask and you would have to be extra careful with type 4 chrom-keyed 
masked images to ensure that you alter the mask color as well as the 
image data.

Then there's shfill, where you would have to recalculate the colours to 
include the transfer function.


Of course you are NOT supposed to apply transfer functoins like this, 
the transfer function only applies to a single colour space, and is 
intended to be applied after incoing colours have been converted into 
device space. Page 479 of the PLRM says:

"Transfer functions always operate in the native color space of the 
output device, regardless of the color space in which colors were 
originally specified."

So what *is* the native colour space of a PDF file ?


Also transfer functions are supposed to be device-specific, page 3 of 
the 3rd edition PLRM makes ths quite clear:

"Chapter 7, ?Rendering,? details the device-dependent aspects of 
rendering page descriptions on raster output devices (printers and 
displays). These include color rendering, transfer functions, 
halftoning, and scan conversion, each of which is device-dependent in 
some way."


Older versions of the specification, if I remember correctly, used to 
say that transfer functions should not be used to achieve special 
effects. Sadly a number of applications (Quark Xpress being a notable 
offender) ignored that and the 3rd edition PLRM acknowledges that ths is 
possible merely saying:

"Because transfer functions produce device-dependent effects, a page 
description that is intended to be device independent should not alter 
them."


Its not too hard to apply a single transfer function (ie a gray space) 
to all the components of simple spaces like RGB or CMYK, its not at all 
clear to me how you would apply it to, for example, a CIEBased colour 
space. I don't think that inverting the channels of a CIELab space will 
get you the inverse result. I should probably try that out......

Anyway, while its possible to alter a PostScript program to apply 
transfer functions as colours are specified, it looks lilke it would be 
quite a lot of work to me.


				Ken

Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Ghostscript pickling settransfer jdaw1 <jdawiseman@gmail.com> - 2015-04-14 14:01 -0700
  Re: Ghostscript pickling settransfer ken <ken@spamcop.net> - 2015-04-15 08:15 +0100
    Re: Ghostscript pickling settransfer jdaw1 <jdawiseman@gmail.com> - 2015-04-15 01:45 -0700
      Re: Ghostscript pickling settransfer ken <ken@spamcop.net> - 2015-04-15 10:04 +0100
        Re: Ghostscript pickling settransfer jdaw1 <jdawiseman@gmail.com> - 2015-04-17 01:35 -0700
          Re: Ghostscript pickling settransfer ken <ken@spamcop.net> - 2015-04-17 10:07 +0100
            Re: Ghostscript pickling settransfer jdaw1 <jdawiseman@gmail.com> - 2015-04-18 02:01 -0700
              Re: Ghostscript pickling settransfer ken <ken@spamcop.net> - 2015-04-18 11:23 +0100
                Re: Ghostscript pickling settransfer jdaw1 <jdawiseman@gmail.com> - 2015-04-25 15:06 -0700
                Re: Ghostscript pickling settransfer jdaw1 <jdawiseman@gmail.com> - 2015-05-15 06:37 -0700
                Re: Ghostscript pickling settransfer ken <ken@spamcop.net> - 2015-05-15 15:37 +0100
                Re: Ghostscript pickling settransfer Carlos <angus@quovadis.com.ar> - 2015-05-15 19:45 +0200
                Re: Ghostscript pickling settransfer ken <ken@spamcop.net> - 2015-05-16 09:03 +0100

csiph-web