Hi All,
I have a perl script which enables users to upload a jpg file to my
webserver from their browser. However, I'd like to reformat the
uploaded jpeg to a certain pixel width and height so that it fits in
with my webpage template (and also to avoid massive files being
uploaded). Is there any way to do this in perl?
Thanks in advance,
Mo
Charlie Garrison - 15 Feb 2006 14:09 GMT
Good morning,
>I have a perl script which enables users to upload a jpg file to my
>webserver from their browser. However, I'd like to reformat the
>uploaded jpeg to a certain pixel width and height so that it fits in
>with my webpage template (and also to avoid massive files being
>uploaded). Is there any way to do this in perl?
Quite a few ways; one of the popular ones is ImageMagick.
Charlie

Signature
Charlie Garrison <garrison@zeta.org.au>
PO Box 141, Windsor, NSW 2756, Australia
Brian D Foy - 15 Feb 2006 14:17 GMT
> I have a perl script which enables users to upload a jpg file to my
> webserver from their browser. However, I'd like to reformat the
> uploaded jpeg to a certain pixel width and height so that it fits in
> with my webpage template (and also to avoid massive files being
> uploaded). Is there any way to do this in perl?
There are many solutions, but I like Image::Magick. Although I sometimes
punt to the convert(1) script, the module has the utilities to resize
images. Curiously, the docs aren't in the module:
http://www.imagemagick.org/script/perl-magick.php