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

Home » Public Forums » archive » Splitting JPEG files into RGB components
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: Splitting JPEG files into RGB components [message #21095 is a reply to message #21094] Tue, 08 August 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Dana Purton (dpurton@utas.edu.au) writes:

> I am attempting to read a JPEG file into IDL and then split it into the
> three colour
> components so that each component can be analysed separately. I have
> been
> able to read it in and display it on the screen but am finding it
> difficult to separate it into its red,green,blue components. Is this at
> all possible with JPEG compression, and if so can anyone give me ome
> hints on how to go about it?

Assuming you read the JPEG image into IDL like this:

READ_JPEG, myfile, image, True=3

You can get the RGB components like this:

red = image[*,*,0]
green = image[*,*,1]
blue = image[*,*,2]

Here is a case where you *want* that single dimension
to disappear. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Cell boundary program?
Next Topic: A related question...

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

Current Time: Sat Oct 11 07:18:47 PDT 2025

Total time taken to generate the page: 1.43660 seconds