[K12OSN] OT: Automatically Resize Photos for your users

Timothy Legge tlegge at rogers.com
Sun May 21 03:05:19 UTC 2006


This is slightly off topic but I thought it might be of use to someone 
and might generate a few improvements.

I have places a copy of a script that I wrote at:


What it does
It automatically resizes photos for my users. With this script, they can 
simply copy their digital camera photos to a directory in their home 
directory. When the script runs via cron it will use ImageMagick's 
convert utility to shrink the photo to the default size (1024x768) with 
a quality of 75 and delete the original.

It will automatically create the required directories if they do not exist

Some users are not comfortable with using ImageMagick and few of the 
available gui tools are as fast at resizing multiple files. With this 
script, the users simply drop the files in place, waits a few minutes 
and the cron job resizes the files for them.

It also has the added benefit of reducing the storage requirements for 

Potential issues
The script automatically deletes the original. This is by design don't 
complain to me if you lose original work.

The script currently meets my needs but I would probably add the ability 
for the user to specify a default size, quality, photo directory and the 
option of keeping the originals via a config file in their home directory

Hopefully it will be of some use to someone else.  So far in my testing, 
it works for me and the half dozen users I tested it on.  Read the 
script (its not difficult) and understand what it does before you use it...



More information about the K12OSN mailing list