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

Home » Public Forums » archive » Re: What don't I know about jpeg, 3 channels, and color display?
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: What don't I know about jpeg, 3 channels, and color display? [message #41064 is a reply to message #41058] Thu, 23 September 2004 00:34 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Dee writes:

> thanks, it worked once I also used the true=1 with read_jpeg. I still
> can't use my routines (which assume a 2D array) for displaying etc.
> but I got around that by using other functions. I still don't
> understand the 3D issue with these jpegs though..... :-)

You are using the wrong routines. :-)

You need to get ahold of TVImage, or ImgDisp,
or PlotImage. One of the image display routines
smart enough to figure out if you have a 2D or
3D image and do the right thing. You can find
TVImage here:

http://www.dfanning.com/programs/tvimage.pro

You can, of course, convert a 3D image to a 2D
image, but if you want to maintain a reasonable
representation of the colors in the 24-bit image,
then you have to be very careful about resizing the
image, etc., because the resulting color table
from Color_Quan will not be anything at all like
what you are used to. For example, to convert a
pixel-interleaved 24-big JPEG image:

image2d = Color_Quan(image24, 1, r, g, b)
TVLCT, r, g, b
TV, image2d

Or, you can make a gray-scale image out of the
24 bit image:

http://www.dfanning.com/ip_tips/color2gray.html

You have to be a little bit careful, however, about
using old procedures on JPEG images. A JPEG image
typically only has *color* information, it only
rarely, and then in special conditions, has science
information.

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http:/www.dfanning.com/
Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Previous Topic: Colored image
Next Topic: 3rd Party Active-X

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

Current Time: Thu Oct 09 22:07:44 PDT 2025

Total time taken to generate the page: 1.75861 seconds