Post Sun Nov 27, 2011 9:31 am

Problems about Image

Now I am using PIL..Suppose I have a picture. And its mode is 'P'
So which function can I get the inf about its palette?
When I use function getpixel, it only returns the id in palette
But how can I know the id stands for which color?
how can I get the id of a specific color?
Is is fixed?

when I convert a 'RGB' mode picture to 'P'
how can I calculate the original color' position in palette?
Does the process have a formula?