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

Home » Public Forums » archive » color_quan - how for exactly 256 colors?
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_quan - how for exactly 256 colors? [message #36798 is a reply to message #36682] Fri, 24 October 2003 09:17 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
JD Smith writes:

> Sorry, this is a Perl comment character slipping in... too much Perl'ing
> for IDLWAVE lately (hidden IDLWAVE rumor of the week: an IDL6 version with
> full doc support should be out early next week). It should read:
>
> wh=where(h gt 0,cnt) ; Should be fewer than 256
>
> That is, you'd better have fewer than 256 colors in your rgb image if
> you'd like to create an exact indexed image from it. Also note that the
> original r,g, & b were intended to be *images*, one for each color plane
> of your 24bit image, i.e. I should have written:
>
> rgb_image=r_image+256L*(g_image+256L*b_image)
>
> Got Charm?

Oh, right. Well, yes, that does work nicely. :-)

But, of course, we still have the Color_Quan-like
color table and image. How about extra credit for getting us
back to the original color table vectors and 2D image?

What I wanted to use this for was getting a 2D image
from a pixmap. This would be *so* much more convenient
than having to draw the darn picture in the Z buffer. :-(

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@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
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Create a matrix using repmat
Next Topic: Re: Sorry Re: which OS is faster for idl?

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

Current Time: Fri Oct 10 14:46:44 PDT 2025

Total time taken to generate the page: 0.72169 seconds