in reply to ImageInfo errors
#!/usr/bin/perl use warnings; use strict; use LWP::Simple; use Image::Info qw(image_info dim); my $data = get("http://www.learntogoogle.com/images/addform.jpg"); # this will print binary junk #print "$data\n"; my $info = image_info( \$data ); if (my $error = $info->{error}) { die "Can't parse image info: $error\n"; } my($w, $h) = dim($info); print "$w $h\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: ImageInfo errors
by ikegami (Patriarch) on Feb 22, 2007 at 22:38 UTC |