Installing perlmagick was what I needed. I've written a routine that iterates through the images folder, but I fail to create and assign the object correctly:
sub resize_images { use 5.010; use Path::Class; use Image::Magick; my ($rvars) = shift; my %vars = %$rvars; opendir my $hh, $vars{to_images} or warn "warn $!\n"; while (defined ($_ = readdir($hh))){ my $image = Image::Magick->new; $image->ReadImage($_); $x = $image->Get('filesize'); say "$_ has filesize of $x"; } }
Output:
Screenshot from 2014-08-21 13:10:18.png has filesize of Screenshot from 2014-09-25 17:14:08.png has filesize of Screenshot from 2014-08-21 13:22:42.png has filesize of zbears.jpg has filesize of . has filesize of .. has filesize of yjj.jpg has filesize of
Fishing for tips....
In reply to Re^2: Using ImageMagick effectively
by Aldebaran
in thread Using ImageMagick effectively
by Aldebaran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |