[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Converting 24 bit images to 8 bit images with a specific colour table
- Subject: Re: Converting 24 bit images to 8 bit images with a specific colour table
- From: philaldis(at)geocities.com (Phil Aldis)
- Date: Fri, 07 May 1999 11:01:44 GMT
- Newsgroups: comp.lang.idl-pvwave
- Organization: Defence Evaluation & Research Agency
- References: <3731bbd6.17007361@146.80.9.44> <3731CDAE.66C1E4CD@ssec.wisc.edu>
- Reply-To: philaldis(at)geocities.com
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:14649
On Thu, 06 May 1999 12:13:18 -0500, Liam Gumley
<Liam.Gumley@ssec.wisc.edu> wrote:
>Phil Aldis wrote:
>> If I have a 24bit image and I want to convert it to an 8bit image
>> which uses a particular table, so find nearest values.
>> This is of particular use, when you're writing multiple gifs from 24
>> bit images, because color_quan, will obviously not work, because the
>> colour table has to be global.
>
>If you want to create a GIF which contains 2 sub images derived from 24
>bit true color images, you need to split the color table. Here's an
>example:
>
>---
>Liam E. Gumley
>Space Science and Engineering Center, UW-Madison
>http://cimss.ssec.wisc.edu/~gumley
Okay well, I should have made myself more clear. I'm currently working
on an object graphics environment , which uses direct graphics to
display. Whe you put a load of objects together, you put them into a
view object, which is like the IDLgrview object, and this can be
displayed in the window object, or sent to the postscript object.
However, I thought some gif, bmp etc. output objects would be kinda
cool.
So you'd pass the gif object a view and it would display it in a
pixmap, tvrd() the image and write it to gif. The problem is that the
only way I can be really sure of getting the right values back from a
tvrd() is to set true colour on, and get back a true colour image. So
then I want to pass this image back through the colour tables that
they have specfiied (which by default would be the current ones), and
find the closest match.
I hope I've now explained myself a bit better, and if you look at teh
code I put in with my initial post, I think it's amde a bit clearer
what I mean.
Cheers,
Phil