Changeset 4
- Timestamp:
- 02/06/07 20:57:30 (2 years ago)
- Files:
-
- trunk/Memories/Photo.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Memories/Photo.pm
r2 r4 175 175 } 176 176 177 my %banned_tags = map { $_ => 1 } 178 qw( CodedCharacterSet ApplicationRecordVersion ); 179 177 180 sub _exif_info { 178 181 my $exifTool = new Image::ExifTool; 179 $exifTool->Options(Group0 => [' EXIF', 'MakerNotes', 'Composite']);182 $exifTool->Options(Group0 => ['IPTC', 'EXIF', 'MakerNotes', 'Composite']); 180 183 my $info = $exifTool->ImageInfo(shift->path); 181 184 my $hash = {}; 182 185 foreach my $tag ($exifTool->GetFoundTags('Group0')) { 186 next if $banned_tags{$tag}; 183 187 my $group = $exifTool->GetGroup($tag); 184 188 my $val = $info->{$tag}; 185 189 next if ref $val eq 'SCALAR'; 186 next if $val =~ /^[0\s]*$/ ;190 next if $val =~ /^[0\s]*$/ or $val =~ /^nil$/; 187 191 $hash->{$group}->{$exifTool->GetDescription($tag)} = $val; 188 192 }
