Posts Tagged ‘thumbnail


Python thumbnail generator

This is the second version of my first Python program. You know the problem, you got a blog, a website, want to send an email or chat with a lot of photo’s, but nowadays camera’s shoot photos of at least 3 Mega Pixel, if not 10 or more. That is going to take forever to send/receive, if at all posible.(most web server have an upload limit of 5MB)

That is why I made this script, it takes all the jpg files in on(or even more) directories and copies a thumbnail over to another directory. The default is to take all the jpg files in ‘.'(current directory) and copy them with a maximum size of 500×500 to ‘./thumbnails’. Want something else? you can specify the maximum with and height, as much source directories as you want and one destination.

The usage is:

python -w 300 -h 200 /some/photo/dir /another/vacation/photo/dir /the/destination/directory/for/thumbnails

The first version had a very bad coding style, but here is the new version:
note: It does not yet work without source and target dir, but I’m working on that fixed it!
another note: You’ll need PIL

I’m now on, so here’s the link:


My blog has moved!

My blog has permanently moved to a self hosted Wordpress at

This blog will stay around for accidental search engine visitors.


This is me

Blog Stats

  • 22,751 hits


Error: Twitter did not respond. Please wait a few minutes and refresh this page.