g_speran has asked for the wisdom of the Perl Monks concerning the following question:
Hello Perl Monks
I am trying to use ExifTool to extract some Metadata TAGS. I've searched for a specific use case but was unsuccessful. Ive constructed some simple code to accomplish what I am trying to do, but I am looking for verification that I am doing it correctly to extract the necessary variables or is there a simpler way.
use Image::ExifTool qw(:Public); use Data::Dumper; $file='d:/60486581538__715F9238-09E5-4806-8146-0626DAFB0E36.JPG'; $ExifTool = new Image::ExifTool; #$ExifTool->Options(DateFormat => '%Y-%m-%d'); $info = $ExifTool->ImageInfo($file,'SubSecCreateDate','LensModel'); #$info = $ExifTool->ImageInfo($file); print "INFO: $info\n"; $createdate=$$info{'SubSecCreateDate'}; $lens=$$info{'LensModel'}; print "\nCreate Date: $createdate\n"; print "Lens Model: $lens\n\n"; print Dumper($info); exit; D:\>metadata.pl INFO: HASH(0x2b9f148) Create Date: 2020:03:02 13:16:55.336-05:00 Lens Model: iPhone 7 back camera 3.99mm f/1.8 $VAR1 = { 'LensModel' => 'iPhone 7 back camera 3.99mm f/1.8', 'SubSecCreateDate' => '2020:03:02 13:16:55.336-05:00' }; D:\>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: printing metadata Tag using ExifTool
by g_speran (Scribe) on Apr 13, 2021 at 19:39 UTC |