Why would anyone want to do this with a language like Python? Fortunately this is not a question I've had to ask myself since the answer seems pretty obvious to me. But basically that's what this article is all about. Over the next few pages we'll be looking at some of the different places you could use Python to automate and generally play with your images. You will need to have at least basic knowledge of these subjects, so if you're new to Python you should probably read Vikram Vaswani's "Python 101" first and come back later! So let's add a little extra image processing power to Python! You can get the latest version of PIL from www.pythonware.com Windows users should download the windows installer (.exe). Those installing PIL from source should probably take a look through "Installing Python Modules" in the Python docs, if only out of interest. On to the Fun Stuff Ok, now that we have the "basics" out of the way, it's time for the fun stuff! Something like converting a JPEG image to a GIF maybe. In most cases all you should have to do is open the image and save it with a different file extension and PIL will do the rest!
If this didn't work for you, don't worry; chances are all you have to do is add another line before saving.
blog comments powered by Disqus |