Fredrik Lundh is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

effbot / pil-2009-raclette http://effbot.org/zone/pil-index.htm

Work repository for PIL 1.1.7 and beyond. The "default" branch should be fairly solid, the other branches less so. For production use, see the pil-117 repository.

Clone this repository (size: 1.6 MB): HTTPS / SSH
hg clone https://bitbucket.org/effbot/pil-2009-raclette
hg clone ssh://hg@bitbucket.org/effbot/pil-2009-raclette

Issues

#14 ValueError when opening PNG file

Reported anonymously

I hope this is the official PIL development repository... PIL homepage is light on details. Anyway...

On some palette-based PNG files, an error is raised, e.g.

ValueError: invalid literal for int() with base 10: '\xff'

This is caused by the following line in getcolor() in ImagePalette.py:

self.palette = map(int, self.palette)

which should be

self.palette = map(ord, self.palette)

After coming up with the potential fix, I looked around and found it implemented in some PIL forks out there (and even mentioned in the official mailing list as a fix for this bug) - but unfortunately it's not yet fixed in the official PIL.

Status: new Responsible: nobody Type: bug Priority: major
Milestone: raclette-final Component: pil-core Version: pil-1.1.7

Attachments

No attachments added for this issue yet.

Comments and changes

No comments added for this issue yet.

Add comment / attachment

Verification: Please write the text from the image in the box (letters only)

captcha

Is that you, Humanoid? Is this me?