468,556 Members | 2,232 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,556 developers. It's quick & easy.

PIL and transparency in IE

I have big problem when i try generate a PNG image with transparent
background. When i open a source PNG file with tranasparent background
everything is going well but not in IE. I know that is a bug in IE.
But i can make PNG with transparent in PHP or graphic program it runs
well in IE (execly no with transparent background but with transaprent
object). But when I open it
in Python the Python generates error:

File "C:\WINDOWS\Pulpit\python\piatek\googlepl.py", line 33, in ?
im.save(name, "PNG")
File "C:\PYTHON22\Lib\site-packages\PIL\Image.py", line 1125, in
File "C:\PYTHON22\Lib\site-packages\PIL\ImageFile.py", line 114, in
File "C:\PYTHON22\Lib\site-packages\PIL\Image.py", line 507, in load
apply(self.im.putpalette, self.palette.getdata())
File "C:\PYTHON22\Lib\site-packages\PIL\ImagePalette.py", line 39,
return self.mode + ";L", self.tostring()
File "C:\PYTHON22\Lib\site-packages\PIL\ImagePalette.py", line 45,
return array.array("B", self.palette).tostring()
TypeError: an integer is required

this is my cod:

im = Image.open("przez.png")
draw = ImageDraw.Draw(im)
font = ImageFont.truetype(FONTFILE, 56)
draw.text((450, 320), title, font=font, fill="black")
im.save(name, "PNG")

Can someone help??
Jul 18 '05 #1
0 1950

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Cecile Muller | last post: by
57 posts views Thread by Piotr Wolski | last post: by
4 posts views Thread by Matthias Czapla | last post: by
2 posts views Thread by Robin Becker | last post: by
3 posts views Thread by Mr. x | last post: by
20 posts views Thread by Nathan Sokalski | last post: by
6 posts views Thread by tommaso.gastaldi | last post: by
reply views Thread by ZikO | last post: by
3 posts views Thread by Martijn Mulder | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.