[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Display Gifs, each w/diff color tables?
- Subject: Re: Display Gifs, each w/diff color tables?
- From: davidf(at)dfanning.com (David Fanning)
- Date: Mon, 12 Jul 1999 20:44:03 -0600
- Newsgroups: comp.lang.idl-pvwave
- Organization: Fanning Software Consulting
- References: <7mdadu$ppb$1@nnrp1.deja.com>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:15637
Rose (rmlongfield@my-deja.com) writes:
> Here's a question I haven't seen discussed yet. I have several
> different GIF files given to me by several sources. I can read and
> display them individually. However, I can't look at them all at the same
> time. This is, I believe, due to the fact that the GIF files come with
> their own color tables. Every time a new one is loaded, the color table
> from the previous one is re-defined. I have tried the
> "split table" technique outlined in DWF's book, but it doesn't work
> because some of the GIF images fill in all the r,g,b arrays.
>
> Now, these are just xy plots and clearly all these colors are
> not necessary. Is there some way of defining which colors are important
> and which are just "pretty"? Maybe a reverse color24 function (DWF)?
Well, as Liam points out, if you had a 24-bit color display
things would be easy. But I'm guessing that if you had a
24-bit color display, you wouldn't be needin' us. :-)
So, here is what I would do, assuming that the GIF files
really only do use a handful of colors each. I'd create
color separations of the GIF image, just as if you were
going to create 24-bit JPEG images, for example:
http://www.dfanning.com/tips/jpeg.html
Then, I would take these 24-bit images and I would pass them
through COLOR_QUAN, but I would use the COLORS keyword and
restrict the number of output colors to something like 16 or
so. Then, I would use the split color table method you
tried previously, but now using the color table vectors
you get back from COLOR_QUAN. If all goes well, that should
work, although I have definitely NOT tried it just now.
I guess it wouldn't hurt to make a sacrifice and light
a candle for the programming gods before you start coding
it up, too. Or, you could put the money for the candle
into the fund for the 24-bit display. :-)
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