Problems about Image
Q1:
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?
Q2:
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?
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?
Q2:
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?

