I failed to specify the color of the text while drawing a text into an image:
>>> import Image, ImageDraw, ImageColor, ImageFont >>> image = Image.open("a.gif") >>> draw = ImageDraw.Draw(image) >>> font = ImageFont.truetype("arial.ttf", 15) >>> color = "blue" >>> draw.text((10, 10), "HELLO", fill=color, font=font) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "D:\Program Files\Python25\Lib\site-packages\PIL\ImageDraw.py", line 256, in text ink, fill = self._getink(fill) File "D:\Program Files\Python25\Lib\site-packages\PIL\ImageDraw.py", line 145, in _getink ink = self.palette.getcolor(ink) File "D:\Program Files\Python25\Lib\site-packages\PIL\ImagePalette.py", line 62, in getcolor self.palette = map(int, self.palette) ValueError: invalid literal for int() with base 10: '' Any comment are appreciated.
_______________________________________________ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig