Re: Converting 24 bit images to 8 bit images with a specific colour table [message #15258] |
Thu, 06 May 1999 00:00 |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Phil Aldis wrote:
> Well, the subject says it all, really.
>
> 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.
>
> The only way I can think to do it is very slow and certainly not using
> IDL array operations. For simplicity I'll asume that the image is
> interleaved true=1, i.e. 3 x n x m
>
Look at COLOR_QUAN
The COLOR_QUAN function quantizes a true-color image and returns a
pseudo-color image and palette to display the image on standard
pseudo-color displays. The output image and palette can have from 2 to 256
colors.
I'd run in the same problem some weeks ago. David F. gaves me the idea to
use this function.
multiple gifs are using only one colortbale. If you have different color
tables you should think about using mpeg.
R.Bauer
|
|
|