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 ]
In reply to Re: How to create JPEG of specified size
by halley
in thread How to create JPEG of specified size
by Limbic~Region
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |