Here's an untested example of fetching all *.jpg and *.jpeg images from within a directory, then working on them with Image::ExifTool. It will search for the files recursively. If you don't want to find images in directories underneath of the directory you're looking in, put a ->maxdepth(1) line above the ->in(...) line in the call to File::Find::Rule.
use warnings; use strict; use File::Find::Rule; use Image::ExifTool qw(:Public); my $dir = '~/Desktop'; my @files; if (-d $dir){ @files = File::Find::Rule->file() ->name('*.jpg', '*.jpeg') ->in($dir); } else { die "that's not a directory dude!\n"; } my $exif_tool = Image::ExifTool->new; for my $img (@files){ $exif_tool->ExtractInfo($img); # do other stuff with exif tool }
In reply to Re: Questions regarding mixing up all the data from Image::ExifTool
by stevieb
in thread Questions regarding mixing up all the data from Image::ExifTool
by Buttonzz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |