Advertisement
hakonhagland

exif-tool

Feb 28th, 2021
1,739
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.33 KB | None | 0 0
  1. use feature qw(say);
  2. use strict;
  3. use warnings;
  4. use Image::ExifTool;
  5.  
  6. my $exif = Image::ExifTool->new();
  7. my $fn = '1.jpg';
  8. $exif->ExtractInfo($fn) or die "Could not extract meta information from '$fn'";
  9. my $create_date = $exif->GetValue('CreateDate');
  10. die "Could not obtain create date from '$fn'" if !defined $create_date;
  11.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement