Koffee Koffee - 1 year ago 140
Python Question

Standalone Python script for image resizing

I'm looking for a standalone python script which can perform 2 simple image editing tasks :

  • Resizing

  • Cropping

I browsed some websites this morning and found 2 interesting modules :

Unfortunately those are too complex for my needs and require installation on the server.

Do you guys know if there is any (very) basic Python script that can be embeded in a single file (standalone) outhere ?

If not, would it be complex to code my own image resizing/cropping script in Python ?


I've installed PIL for python 3x

For those interested, here is a nice tutorial on how to install it :

Install PIL in Ubuntu 12.04 Python 2.7 and Python 3.2

Answer Source

Implementing your own cropping and resizing code which is fast and accurate will not be viable. (PIL is 50% C ).

Implementing the algorithms would be doable (nearest neighbour , bilinear interpolation)
But handling different images formats with loading and saving is a HUGE task.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download