At 12:41 2003-07-14 -0400, Tom Wolfe wrote:
I'm wondering if anyone has any ideas on how I could filter incoming image
attachments to reduce their size before being sent on...
I have recently volunteered to run a mailing list for the Association of
Canadian Mountaing Guides. Many of the contributors have digital photos
(mountain conditions, etc.) to submit but, unfortunately, do not have the
technical savvy to reduce their photos to an appropriate size.
Often photos > 800 KB come through, which is a bummer for those of
us with humble modem connections.
Basically I would want procmail to send jpeg or gif attachments to
something like ImageMagick to resize them to about 200x300 px, and
optimise the image quality, i.e. indexed gif/png (so the image is < 50
KB), then re-insert the attachments into the original email.
This would be doable from an externally-invoked program - a shell script
using a mime de/coder utility would "burst" the message into component
parts, then you could scale and recompress attachments.
Alternatley, you could simply configure your listserve to reject
submissions which exceed some total message size, perhaps with a message
providing a link to a page describing the proper method to save images
efficiently (cropping, scaling, and compressing).
Any ideas on how to get started??... Is this too lofty of a project?
Email really isn't the ideal venue for image attachments - most people so
disconnected that they cannot access a website are going to have issues
with the bandwidth consumed by image attachments. You might be better off
extracting the images (via an external program, called from procmail) and
storing them in a web folder someplace, then inserting weblinks into the
main text body of the message. There are of course issues with _signed_
messages, but few people use public key signing on mailing lists,
particularly non-technical ones.
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
procmail mailing list