use strict;
use warnings;
use Image::Info qw(image_info);

my %OK = (
    'ColorSpace' => 1,              'ComponentsConfiguration' => 1,
    'DateTime' => 1,                'DateTimeDigitized' => 1,
    'DateTimeOriginal' => 1,        'ExifImageLength' => 1,
    'ExifImageWidth' => 1,          'ExifVersion' => 1,
    'FileSource' => 1,              'Flash' => 1,
    'FlashPixVersion' => 1,         'ISOSpeedRatings' => 1,
    'ImageDescription' => 1,        'InteroperabilityIndex' => 1,
    'InteroperabilityVersion' => 1, 'JPEG_Type' => 1,
    'LightSource' => 1,             'Make' => 1,
    'MeteringMode' => 1,            'Model' => 1,
    'Orientation' => 1,             'SamplesPerPixel' => 1,
    'Software' => 1,                'YCbCrPositioning' => 1,
    'color_type' => 1,              'file_ext' => 1,
    'file_media_type' => 1,         'height' => 1,
    'resolution' => 1,              'width' => 1
    );

foreach my $file (@ARGV) 
  {
  my $info = image_info($file);
  print "$file ----------------------------------\n";
  foreach my $key (sort(keys(%$info))) 
    { print "  $key -> $info->{$key}\n" if ($OK{$key}); }
  }
