comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to do RGB to CMYK conversion for PS output?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How to do RGB to CMYK conversion for PS output? [message #49314 is a reply to message #49313] Thu, 13 July 2006 12:23 Go to previous messageGo to previous message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
On Thu, 13 Jul 2006 14:31:22 -0400, Paul Van Delst wrote:

> Hello there,
>
> A colleague produced a colour X-Y plot for a paper and saved it to a regular old PS file.
> The editor mailed back stating that the file contains RGB colours and could we please
> create the file in CMYK colours.
>
> How does one do this? Using
> DEVICE,/CMYK
> produced exactly the same PS file.
>
> Doing,
> TVLCT,r,g,b,/GET
> CMYK_CONVERT,c,m,y,k,r,g,b,/TO_CMYK
> produced the appropriate c, m, y, and k arrays, but how does one "load" the CMYK arrays to
> be used? Doing
> TVLCT,c,m,y
> produced exactly what I thought would happen - no black.
>
> Any ideas?

Yes.

Try:

DEVICE, /CMYK, /COLOR

You need to put the device into color mode when you select CMYK :-).

Make sure that you do any LOADCT's after the DEVICE call.

You also should not need to put CMYK values in the color table with
TVLCT/CMYK_CONVERT. The PS device should do this for you.

For a program like:


SET_PLOT, 'ps'
DEVICE, /CMYK, /COLOR
LOADCT, 5
n = 50 ; Size of array for Bessel
; Make the Bessel function:
a = BESELJ(SHIFT(DIST(n), n/2, n/2)/2, 0)
TVSCL, DIST(n)
nlev = 8 ; Number of contour levels
; Make the Contour at normalized Z=.6:
CONTOUR, a, /OVERPLOT, ZVALUE=.6, /T3D, $
LEVELS=FINDGEN(nlev)*1.5/nlev-.5, COLOR=1
DEVICE, /CLOSE



you'll see an image in the PS file that uses a COLORTAB and

and is rendered with something like:

{COLORTAB currentfile picstr readhexstring pop 0 get
4 mul 4 getinterval } bind false 4 colorimage

Things like contour lines will have postscript color commands like

1.000 1.000 0.000 0.980 setcmykcolor

Hope this helps,

Karl
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL and Macs. Speed is not only about squared roots
Next Topic: Re: Displaying isosurface- Hollow images

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 05:10:30 PDT 2025

Total time taken to generate the page: 0.95589 seconds