Programmer's Corner Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Programmer's Corner - Forums


PIL - Python Imaging Library

 
Post new topic   Reply to topic    Programmer's Corner Forum Index -> Web Development Reference
Author Message
Cerulean
Gokenin


Joined: 22 Oct 2004
Posts: 742
Location: London, England

PostPosted: Sat Oct 23, 2004 6:30 pm    Post subject: PIL - Python Imaging Library Reply with quote

And what a great library it is! High level API, letting you add text to images, convert to text to image, rotate images, resize images on the fly, draw over an image, invert images, plus many more. Can handle jpg, png (and I think GIF).
I had a small problem compiling it (freetype error), but just including the file the compiler says is missing solves it.

For example, to take an image and rotate it by 40 degrees:

Code:
#!/usr/bin/python
import Image

img = Image.open("someimage.jpg")
img = img.rotate(40)
img.save("somerotatedimage.jpg", "JPEG")


And thats it. Very cool.
Back to top
Algorithms
Dragon


Joined: 21 Oct 2004
Posts: 343
Location: Florida

PostPosted: Sun Oct 24, 2004 5:52 am    Post subject: Reply with quote

Can handle JPEG, GIF, PNG, TIFF, BMP. There are also thrid party extensions allowing it to handle other formats. Also I don't know if this is web development reference. It might skews people idea of the library. It is mostly used in desktop applications. Not so much web based. *shrug*
Back to top
Cerulean
Gokenin


Joined: 22 Oct 2004
Posts: 742
Location: London, England

PostPosted: Sun Oct 24, 2004 6:22 am    Post subject: Reply with quote

I'd use it mainly for web things - auto generating thumnails, serving up random images, providing image manipulation tasks.
Plus there's no Python reference.
Back to top
Algorithms
Dragon


Joined: 21 Oct 2004
Posts: 343
Location: Florida

PostPosted: Sun Oct 24, 2004 6:26 am    Post subject: Reply with quote

All the real-world applications using PIL I have seen posted on the Python Mailing lists or in c.l.python have been using PIL in a client application setting. It is not widely used on the web as support for more web gear tasks as only recently been added.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Programmer's Corner Forum Index -> Web Development Reference All times are GMT - 5 Hours
Page 1 of 1

 


Powered by phpBB © 2001, 2002 phpBB Group