pillow

Saving an animated GIF in Pillow

Saving an animated GIF in Pillow Question: (Python 3.4, PIL 1.1.7, Pillow 2.5.1) I expected this to copy the original GIF. from PIL import Image im = Image.open(filename) im.save(‘temp.gif’) Instead, it saves the first frame as a still. What am I doing wrong? Asked By: leewz || Source Answers: Use the script found on the …

Total answers: 4

Error installing Pillow

Error installing Pillow Question: I’m trying to install Pillow for Python and i run this command on the terminal sudo pip install Pillow and i get this error clang: error: no such file or directory: ‘build/temp.macosx-10.10-intel-2.7/_imagingtk.o’ clang: error: no such file or directory: ‘build/temp.macosx-10.10-intel-2.7/Tk/tkImaging.o’ error: command ‘cc’ failed with exit status 1 Any solutions for …

Total answers: 5

Getting "cannot write mode P as JPEG" while operating on JPG image

Getting "cannot write mode P as JPEG" while operating on JPG image Question: I am trying to resize some images, most of which are JPG. But in a few images, I am getting the error: Traceback (most recent call last): File “image_operation_new.py”, line 168, in modifyImage tempImage.save(finalName); File “/Users/kshitiz/.virtualenvs/django_project/lib/python2.7/site- packages/PIL/Image.py”, line 1465, in save save_handler(self, …

Total answers: 5

Can't install Pillow on centos

Can't install Pillow on centos Question: I have cenots 6.3 and python 2.6 on it when I try to install it via easyinstall I get following error: _imaging.c:76:20: error: Python.h: No such file or directory In file included from /tmp/easy_install-HY7WI1/Pillow-2.3.0/libImaging/Imaging.h:14, from _imaging.c:82: /tmp/easy_install-HY7WI1/Pillow-2.3.0/libImaging/ImPlatform.h:14:2: error: #error Sorry, this library requires support for ANSI prototypes. /tmp/easy_install-HY7WI1/Pillow-2.3.0/libImaging/ImPlatform.h:17:2: error: …

Total answers: 3

How do you merge images into a canvas using PIL/Pillow?

How do you merge images into a canvas using PIL/Pillow? Question: I’m not familiar with PIL, but I know it’s very easy to put a bunch of images into a grid in ImageMagick. How do I, for example, put 16 images into a 4×4 grid where I can specify the gap between rows and columns? …

Total answers: 2

Python Image Library fails with message "decoder JPEG not available" – PIL

Python Image Library fails with message "decoder JPEG not available" – PIL Question: PIL does support JPEG in my system. Whenever I do an upload, my code is failing with: File “PIL/Image.py”, line 375, in _getdecoder raise IOError(“decoder %s not available” % decoder_name) IOError: decoder jpeg not available How can I resolve this? Asked By: …

Total answers: 15