Hello. This message consist of two parts:

1)
I found this situation: i have 2 same images in PNG format, but first save in 
RGB mode and second in 8-bit mode. FOr creating i use Pant.NET program on 
Windows XP SP3. 
PIL 1.1.7, Python 2.6.2 . In next you see code and result of executing:

# -*- coding: utf-8 -*-
import Image, ImageDraw

for path in (r'C:\1.png',r'C:\2.png'):
��� image=Image.open(path)
��� print image.format, image.mode, image.size
��� 
��� draw=ImageDraw.Draw(image)
��� draw.line(((0,0),image.size), width=3, fill='green')
��� image.show()



PNG RGB (804, 1082)
PNG P (804, 1082)
Traceback (most recent call last):
� File "C:\Documents and Settings\mer\workspace\test\src\tst.py", line 9, in 
<module>
��� draw.line(((0,0),image.size), width=3, fill='green')
� File "C:\Python26\Lib\site-packages\PIL\ImageDraw.py", line 198, in line
��� ink, fill = self._getink(fill)
� File "C:\Python26\Lib\site-packages\PIL\ImageDraw.py", line 145, in _getink
��� ink = self.palette.getcolor(ink)
� File "C:\Python26\Lib\site-packages\PIL\ImagePalette.py", line 62, in getcolor
��� self.palette = map(int, self.palette)
ValueError: invalid literal for int() with base 10: ''

This situation also founded on PIL 1.1.7, Python 2.7, openSUSE 11.4 Linux
See in debuf founded place were raise exception and i think that is not my 
error in code.
Is it bug?

2) in PIL version 1.1.7 on Windows if i do ImageFont.truetype() than i get 
exception because not _imagingft service in system� (like in Linux). is this 
normal situation on Windows & Where i can get this ?
_______________________________________________
Image-SIG maillist  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to