Thanks, apprecite it. that worked fine.
zentara wrote:
On Thu, 03 Nov 2005 15:29:33 -0600, [EMAIL PROTECTED] (Mike
Blezien) wrote:
Hello,
I'm using ImageMagick to create thumbnails and other image manipulation with a
upload script. And was wondering if the actual pixel size can be checked with
ImageMagick ?? I've used Image::Size to do this, but was wondering it can be
done using ImageMagick without having to install a separate module for this.
A simple example would be appreciated if you know how this is done.
TIA
Here are the 2 ways. Use the Ping method.
#!/usr/bin/perl -w
use Image::Magick;
my $x = $ARGV[0];
my $image;
$image = Image::Magick->new;
$image->Read($x);
my ($w,$h)= $image->Get('columns','height');
print $x,' is ',$w.'x'.$h,"\n";
#this is very inneficient memory wise, use Ping
($width, $height, $size, $format) = $image->Ping($x);
print $width,"\n", $height,"\n" ,$size,"\n", $format,"\n";
--
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>