• Omit a color

    From MrDemmler@21:1/5 to All on Tue Nov 26 13:14:53 2019
    Hello postscript experts.

    I would like to ask if there is a way to suppress a given separation color, while rip output. This means to "remove" this color from output.
    I have tried something like this:
    << [ /Separation (SpotcolorName) /DeviceGray { 0.0 sub } ] 0.0 setcolor >>
    But I get a postscript error.

    In other words I am looking for a ps function to disable a color separation. Any hint is more than welcome.

    Regards and thanks
    Alex

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From MrDemmler@21:1/5 to All on Tue Nov 26 13:28:24 2019
    I also tried sth specify the separations.
    but it seems like this works only for separated output. Not for composite CMYK output.

    /SeparationColorNames [ /Cyan /Magenta /Yellow /Black /Spot#201 ] /SeparationOrder [ /Magenta /Yellow /Black /SpotcolroName ]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From ken@21:1/5 to All on Wed Nov 27 08:31:25 2019
    In article <0ef2a848-6049-46b6-8305-998ae87d8942@googlegroups.com>, news@ademmler.com says...

    I also tried sth specify the separations.
    but it seems like this works only for separated output. Not for composite CMYK output.

    /SeparationColorNames [ /Cyan /Magenta /Yellow /Black /Spot#201 ] /SeparationOrder [ /Magenta /Yellow /Black /SpotcolroName ]

    I'm not sure what you mean by 'works only for separated output'.
    Separation colour spaces are defined so that if the colorant is
    available on the device then the marking operations use it.

    If the colorant is not available on the device, wether the device is
    composite or separating, then the PostScript interpreter uses the
    supplied tint transform to select an alternate (device) colour space,
    and transforms the value of the component in the Separation space into a
    set of values for the components of the alternate space. It then marks
    the output using those components.

    So if the ink isn't available, then you get a reasonable approximation
    of the marks it would have made, using the alternate space.

    By the way, your code there is unlikely to work, since it has a
    different array of names for SeparationColorNames and SeparartionOrder.


    Ken

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From ken@21:1/5 to All on Wed Nov 27 08:26:03 2019
    In article <5631c8cb-807a-4453-913d-96f47acf6ce4@googlegroups.com>, news@ademmler.com says...

    I would like to ask if there is a way to suppress a given separation
    color,
    while rip output. This means to "remove" this color from output.
    I have tried something like this:
    << [ /Separation (SpotcolorName) /DeviceGray { 0.0 sub } ] 0.0 setcolor >> But I get a postscript error.

    That code simply declares a dictionary, it doesn't do anything with it.
    Leaving stuff lying around on the stack is quite likely to cause a
    PostScript error.

    Even if it did do something, it probably wouldn't be what you expect,
    and it certainly wouldn't override the definition of the colour space in
    the PostScript program.


    In other words I am looking for a ps function to disable a color
    separation.
    Any hint is more than welcome.

    PostScript doesn't contain such an operator.

    What you can do is take advantage of the fact that, in order to draw
    anything in a given colour, the program must first set that colour to be current, and if its a complex colour, such as a Separation, then it must
    first set the colour space.

    To do this the program must first set the colour space, and to do that
    it must use the setcolorspace operator. What you can therefore do is
    create your own definition of setcolorspace, and you can have that re- definition do whatever you want with the current colour.

    Eg:

    /original_setcolorspace /setcolorspace load def

    /setcolorspace
    {
    dup type arraytype eq {
    dup length 4 eq {
    dup 1 get cvn /TargetSpot eq {
    % Found the spot we are interested in, do something with it
    } {
    original_setcolorspace
    } ifelse
    }{
    original_setcolorspace
    } ifelse
    }{
    % Not an array type so can't be a complex space
    original_setcolorspace
    } ifselse
    } bind def

    The first thing to be aware of is that this can be defeated, if the
    PostScript program following it pulls the definition of setcolorspace
    directly from systemdict, instead of using the current definition.

    In that case you are, basically, out of luck, you can't normally change
    the contents of systemdict because its read only.


    The second thing you need to think about is what you are going to do
    with the colour space. Your original code subtracted 0 from the colour
    value and used that as a colour in DeviceGray. That still causes the
    marking operations to mark the output, but in shades gray instead of
    colour.

    It looked like you might have been trying to use 0 setgray, which will
    actually set the colour to black (gray is inverted with respect to
    CMYK). Assuming you meanted to use 1 setgray to set white, then you
    need to consider whta happens if any marking operation intersects any
    marks already on the output. Those will then be overwritten with white
    (ie erased).

    PostScript doesn't have any transparency (with the exception of
    overprint and masked images), there is no 'transparent' colour, so you
    can't set the current space to 'transparent' or 'non-marking'

    Your best bet would probably be to translate the current point off the
    media so that the marks take place in user space that does not intersect
    the output.

    Note also that the code above doesn't cater for images or shading
    patterns, both of which can define their own colour space and do not use setcolorspace to do so. So you would have to redefine the 'image' and
    'shfill' operators with code which investigates the colour space of the
    image or shading, and deals with those. This code is left as an exercise
    for the student....

    Oh, you probably also need to think about DeviceN colour spaces, which
    can also contain spot colours.


    Some professional PostScript RIPs are capable of doing all this for you,
    of course, you should probably check with your supplier.

    It might help if you explained why you want to do this, rather than
    sending the PostScript back to the designer and telling them that if
    they don't want to have these colours output, they houldn't put them in
    the input.



    Ken

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From MrDemmler@21:1/5 to All on Wed Nov 27 09:25:06 2019
    Dear Ken,

    thx for your very detailed explanation. This explains a lot.
    You are right about the color names - has been a typo from copy paste.
    I was playing with ghostscript using this command.

    gs -sDEVICE=tiffsep -dNOPAUSE -dBATCH -sOutputFile=test.tiff -r50 -csetcolor.ps -f test.pdf

    While setcolor.ps contains:
    <<
    /Separations true
    /Setoverprint true
    /ProcessColorModel /DeviceCMYK
    /SeparationColorNames [ /Black /Spot ] /SeparationOrder [ /Black /Spot ]
    setpagedevice

    I still get all colors as separations C +M + Y + K + Spot

    Any idea what I am doing wrong here?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From ken@21:1/5 to All on Thu Nov 28 09:58:06 2019
    In article <0278a83e-9e2e-4497-bbdd-9dcb438286c2@googlegroups.com>, news@ademmler.com says...

    Dear Ken,

    thx for your very detailed explanation. This explains a lot.
    You are right about the color names - has been a typo from copy paste.
    I was playing with ghostscript using this command.

    gs -sDEVICE=tiffsep -dNOPAUSE -dBATCH -sOutputFile=test.tiff -r50 -csetcolor.ps -f test.pdf

    While setcolor.ps contains:
    <<
    /Separations true
    /Setoverprint true
    /ProcessColorModel /DeviceCMYK
    /SeparationColorNames [ /Black /Spot ] /SeparationOrder [ /Black /Spot ]
    setpagedevice

    I still get all colors as separations C +M + Y + K + Spot

    Any idea what I am doing wrong here?

    Nothing.

    There isn't anything in the PostScript Language which says you can force
    the device not to produce the Process Color Model colourants.

    If you look at page 437 onwards in the PLRM it basically says that the ProcessColorModel colourants are always available and the
    SeparationColorNames parameter declares the names of *additional* spot colourants.

    So in your case the ProcessColorModel is DeviceCMYK and you have defined
    an additional colourant of /Spot. The result is that you get CMYK+Spot
    plates.

    The *only* device colour model which does not imply a ProcessColorModel
    is DeviceN.

    Ghostscript does have a devicen device and that will, broadly, behave in
    the manner you want I think. But its really intended as a
    demonstration/test harness, not for actual production. The output format
    of the colourants is 'bit' which is probably not useful. Also my experimentation with this device doesn't seem to produce anything useful
    with DeviceN. Its not my specialist subject so I could be doign
    something wrong.

    However, I don't really see the problem, if you're using Ghostscript to
    produce plates, just ignore the ones you don't want. If you're using Ghostscript just to test out PostScript you intend to send to another
    RIP then I'm afraid you are out of luck, you're in device-dependent
    behaviour here, and what Ghostscript chooses to do won't reflect what
    another device might choose to do.

    Perhaps it would help if you could explain *why* you want to only
    produce certain plates.


    Ken

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)