[Image-SIG] perhaps bug report
JOHN_16
john_16 at list.ru
Tue Apr 19 04:09:46 CEST 2011
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 ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20110419/1f2c9de4/attachment.html>
More information about the Image-SIG
mailing list