Content-Aware Image Resizing in Python

28 novembre 2009

Enlarged picture

We have a newcomer in the zoo ! There are a few versions of Seam Carving Image Resizing in Python, but here is my shot at this. It’s a simple single-file script that can seamlessly resize (reduce or expand) pictures. Additionally, you can choose to save partial results, to see how the algorithm works or to produce a video. The syntax would be :

python seamresize.py <resize|enlarge> <picture> <number_of_pixels> [save_partials]

The script itself is short, heavily commented, and probably a good start if you want to add more features — oh, at it requires the Python Image Library. And you also can watch some demos.

Kudos

Discussion, liens, et tweets

J’écris des sites web, des logiciels, des applications mobiles. Vous me trouverez essentiellement sur ce blog, mais aussi sur Mastodon, parmi les Codeurs en Liberté, ou en haut d’une colline du nord-est de Paris.