lunes, 11 de junio de 2012

Testing PIL for jpeg support

If you are unsure that your PIL instalation found libjpeg and thus you have jpeg support in django or any app that uses PIL, you can enter the django shell
./manage.py shell
>>>from PIL import Image
>>>im = Image.open("bride.jpg")
>>>im.rotate(45).show()
<PIL.Image.Image image mode=RGB size=960x293 at 0x2D2D560>
The last line is the confirmation that it worked, you have jpeg support. 

No hay comentarios:

Publicar un comentario