Resize/compress pictures when sending mail

David Fletcher kubuntu-users at thefletchers.net
Thu Oct 25 09:26:12 UTC 2007


On Thursday 25 Oct 2007, Knapp wrote:
> Imagemagick is the classic command line tool for this job. Here is a bit
> from their web site. There is a good chance that it is in your computer now
> but just apt-get it if not.
> 
> Douglas

That's what I use too.

Some time ago I figured out how to make a bash script loop work in sequence on 
files in a directory, and from there it's pretty simple to copy and slightly 
adapt the script to do all sorts of useful things, such as:-

Convert all the .ppm files produced by ufraw into .png files.

With the insertion of a single awk command, it renames all the raw files from 
my camera so that the date and time the picture was taken becomes part of the 
file name.

When I need to ftp a batch of images (maybe 100 or more) to photobox for 
printing at 8x6 inches, I copy everything into a temporary directory for 
printing. Then another version of my script uses convert to change all the 
files from full resolution .png files to 2400x1800 pixels, 300dpi, 80% 
quality .jpg files. I just get on with something else while the script does 
the donkey work.

No doubt I'll soon find further uses for it.

Dave



-- 
Registered Linux user number 393408

I use and recommend the email service at 1 & 1
For domain registration, email and web hosting please visit:
http://oneandone.co.uk/xml/init?k_id=6389763




More information about the kubuntu-users mailing list