misleading error when using negative floats

Florian Ludwig <[email protected]>
Newsgroups gmane.comp.python.image
Message-ID <1285450933.5821.13.camel@snowball>
Hi,

img.paste accepts positive floats with an deprecation warning but not
negative floats. The following exception is thrown:
  File "/usr/lib/python2.6/dist-packages/PIL/Image.py", line 1101, in
paste
    self.im.paste(im, box, mask.im)
ValueError: images do not match

I got two wishes :)

 - be more consistent
   (for example working negative floats with a deprecation warning?)

 - throw a more descriptive error

It cost me some hours as I was investigating in the wrong direction as I
thought the image was wrong, not the positioning.

Thank you,
 Florian


-- 
Florian Ludwig <[email protected]>

_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
signature.asc (application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAABAgAGBQJMnmyxAAoJEMyx5lOOPGipiMcP/RpD4ntaJb0OC8WvZErG1Hbt
zWLn724Jn7XSESWt15gHNXxD/qxXiqxJ6bxFEQOfugFMfuoEraLRNeSQzN9QkVyt
F0Yi80KAkmoyK4VQNzZ497ftbogZTSBn42YaAaNw8R9A+b3aC3+1ZbJ4lw3Z7gCt
/TJnt5RdX2cniKmFYA+/3dS0aU3U3OLA6MKpYzaSP9uQqNENV5KZR9854GKA8zX+
hAAAm6qIJHF3L7LYHA1vgFk6ZrJMLLG/4IiReC+T3hEOzcZ7K3i9a+EHCpkyOLc8
byGkcOew2pTSxIvAW9mYFsr9uvoqv2cFM4vdaeHWsUTWqt4Xd4/CyxpVizheIYoq
qg/Bk+xmkuKQegG2jCVK4PAQfi6wgXf++gdvtfyAyehdl33+SR7gwO16PB35bMtx
xMvmxThUiVPa1kHq8AdTf/Z7WgBGm22WvqJjMpSHmypMNYlnr6ywPrfsmTKGkutA
W4qFKArQFLI1G42CtcSEAEy6qSa8pU33j3fsaAlMNbzcp538icBh81Hl91R+Tg6z
QNlzezi2aq+VEt1qS9phRuB4K2n3amNiymYZW+Q4gp9oZCMUyrOT7h3rKVzn9Bgk
iu226VYbD2gnd855IzMj1uaDKoi5LJ2M59c/UKOP43IQOzdUZ3Tc3nsfNSpq3IvF
prqaND9je/W6hybNWyLg
=CTyh
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.