[Image-SIG] Palette documentation?

Nick Bower bowern@ses.curtin.edu.au
Thu, 03 Aug 2000 02:31:23 GMT


Hi - I've been trying to work out how to use a custom palette with PIL=20
with no success.

I have a 4-byte (indexed) input image (output from a plotting package=20
actually) in which each index is distinctly different: 0=3Dback,=20
1=3Dred,...16=3Dwhite.  To view this I am creating a PIL PhotoImage and =
then=20
embed this into a Tk Canvas.

Unfortunately I can't find any documented way on the ImagePalette format=
=20
so I can create a new one to match my input image.  The linear ramping o=
f=20
RGB mode is obviously inappropriate and results in no color separation.

Can someone help me?

Thanks very much, Nick,