in reply to How to create JPEG of specified size
orsystem("convert xc:white -geometry 200x200 output.jpg");
See http://www.imagemagick.org/script/perl-magick.php for more details.my $image = new Image::Magick(geometry => '200x200'); $image->Read('xc:white'); $image->Write('output.jpg');
If you want to READ a given file, figure out its size, and use that, then you will also want the following:
(The 'xc:____' is a "virtual limitless file" for input, kinda like /dev/urandom, except all pixels are of the named color. You can use #FFFFFF notation here too. Or supply an original image filename without the 'xc:' prefix.)my $original = new Image::Magick(); $original->Read('original.jpg'); $geometry = $original->Get('geometry');
--
[ e d @ h a l l e y . c c ]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to create JPEG of specified size
by halley (Prior) on Jul 25, 2007 at 15:06 UTC | |
by Limbic~Region (Chancellor) on Jul 25, 2007 at 16:45 UTC | |
by halley (Prior) on Jul 25, 2007 at 19:12 UTC |