#28 Image Information

Digital cameras store a lot of information about a photograph in a hidden encoding in the image. Perl can make this information visible.

The Code

 1 #!/usr/bin/perl 2 use strict; 3 use warnings; 4 5 my %good = ( 6 'ColorSpace' => 1, 7 'ComponentsConfiguration' => 1, 8 'DateTime' => 1, 9 'DateTimeDigitized' => 1, 10 'DateTimeOriginal' => 1, 11 'ExifImageLength' => 1, 12 'ExifImageWidth' => 1, 13 'ExifVersion' => 1, 14 'FileSource' => 1, 15 'Flash' => 1, 16 'FlashPixVersion' => 1, 17 'ISOSpeedRatings' => 1, 18 'ImageDescription' => 1, 19 'InteroperabilityIndex' => 1, 20 'InteroperabilityVersion' => 1, 21 'JPEG_Type' => 1, 22 'LightSource' => 1, 23 'Make' => 1, 24 'MeteringMode' => 1, 25 'Model' => 1, 26 'Orientation' ...

Get Wicked Cool Perl Scripts now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.