On 2009-07-30 05:09, Milton Cezar Ribeiro wrote:
a = numpy.array(landscape_matrix)
i = Image.fromarray(a)
i.show()
But now I need to define a color table like
#index of color, R, G, B
0 255 255 255
1 127 127 0
2 127 0 127
3 255 0 0
4 0 255 0
How can I assign this color table to my image?
If you create a "P" type image, you can use the putpalette() method to
attach your desired color table.
http://pythonware.com/library/pil/handbook/image.htm
_______________________________________________
Image-SIG maillist - Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig