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

Home » Public Forums » archive » Re: Color separation with IDL
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: Color separation with IDL [message #9505] Thu, 10 July 1997 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Miska Le Louarn writes:

> I would like to print an image to a slide. To do that, I need a color
> separated version of this image, i.e. three images, each containing the
> Red, Green or Blue component of the image to be printed.
>
> Then I could save these 3 images into a single TIFF file, using the
> planarconfig keyword, and send the image to the printing company...
>
> So would any of you know how to do this color separation ? I would
> *think* it should be fairly simple to do, but I don't know how to get
> started !

This color separation technique is explained more completely in
a tip entitled "How do I create a color JPEG file from a 2D image?"
on my web page, but this is how I would do it:

; Get some image data.

image = DIST(300)

; Load a color table and get the RGB color vectors
; in the Z-graphics buffer.

thisDevice = !D.Name
Set_Plot, 'Z'
LoadCT, 5 ; Standard Gamma II
TVLCT, r, g, b, /Get
Set_Plot, thisDevice

; Create the color separations by running the image
; through the color vectors. (Image is scaled into
; range of 0-255.)

redImage = r(image)
greenImage = g(image)
blueImage = b(image)

; Create the TIFF file. Note that you *may* want
; to make a 24-bit TIFF image, in which case
; you just combine these three separate images
; into a 3D array.

Write_Tiff, 'thisTiffFile.tif', PlanarConfig=2, $
Red=redImage, Green=greenImage, Blue=blueImage

Cheers,

David

------------------------------------------------------------ ---
David Fanning, Ph.D.
Fanning Software Consulting
Customizable IDL Programming Courses
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
IDL 5 Reports: http://www.dfanning.com/documents/anomaly5.html
[Message index]
 
Read Message
Previous Topic: Re: Need 2-dimensional Y versus X curve fit routine
Next Topic: http://www.love.com

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

Current Time: Fri Oct 10 15:07:33 PDT 2025

Total time taken to generate the page: 1.04281 seconds