On Tue, 29 Apr 2008 4:09:05 pm cafeeee wrote: > >>> 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: ''
Hmmm, the docmentation is here: http://www.pythonware.com/library/pil/handbook/imagedraw.htm It's a bit ambiguous, as on the top it states that colours can also use HTML like names (as you did), but further down it says for the options this: "fill: integer or tuple" So, is it possible that your version of PIL is < 1.1.4, or that your image type is incompatible with (that type of) colours? Just give the other options a shot as mentioned in the section "Colours" and/or "Colour Names". HTH, Guy -- Guy K. Kloss Institute of Information and Mathematical Sciences Te Kura Putaiao o Mohiohio me Pangarau Room 2.63, Quad Block A Building Massey University, Auckland, Albany Private Bag 102 904, North Shore Mail Centre voice: +64 9 414-0800 ext. 9585 fax: +64 9 441-8181 eMail: [EMAIL PROTECTED] http://www.massey.ac.nz/~gkloss/
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig