[Image-SIG] Skewing when converting with ImageQt
Carl.Petterson at tobii.com
Tue Jun 23 09:53:03 CEST 2009
> -----Original Message-----
> From: fredrik.lundh at gmail.com [mailto:fredrik.lundh at gmail.com] On
> Behalf Of Fredrik Lundh
> Sent: den 22 juni 2009 16:33
> Looks like PIL doesn't do line alignment correctly for mode L and P
> images (at least). Hmm.
> Can you check if it works correctly if the width is a multiple of 4?
> What happens if you explicitly convert the image to RGB before passing
> it to the wrapper?
> (Are you using the ImageQt file from
> http://svn.effbot.org/public/stuff/sandbox/pil/ImageQt.py or some
> other version, btw? I doubt the one in 1.1.7 works any better than
> that one, though, but it's good to know what code you've been using).
Thank you for your quick reply.
Seems you are right about that, all the skewed images have width%4 != 0.
Converting to RGB (with img2=img.convert('RGB')) crashes python when creating the wrapper. No exception or anything, "Python has stopped working, Windows is checking for a solution".
I was using PIL 1.1.6, but just downloaded and tried with PIL 1.1.7b1. Same result however.
More information about the Image-SIG