"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Image/ExifTool.pm" between
Image-ExifTool-12.26.tar.gz and Image-ExifTool-12.27.tar.gz

About: ExifTool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in a wide variety of files.

ExifTool.pm  (Image-ExifTool-12.26):ExifTool.pm  (Image-ExifTool-12.27)
skipping to change at line 31 skipping to change at line 31
use File::RandomAccess; use File::RandomAccess;
use overload; use overload;
use vars qw($VERSION $RELEASE @ISA @EXPORT_OK %EXPORT_TAGS $AUTOLOAD @fileTypes use vars qw($VERSION $RELEASE @ISA @EXPORT_OK %EXPORT_TAGS $AUTOLOAD @fileTypes
%allTables @tableOrder $exifAPP1hdr $xmpAPP1hdr $xmpExtAPP1hdr %allTables @tableOrder $exifAPP1hdr $xmpAPP1hdr $xmpExtAPP1hdr
$psAPP13hdr $psAPP13old @loadAllTables %UserDefined $evalWarning $psAPP13hdr $psAPP13old @loadAllTables %UserDefined $evalWarning
%noWriteFile %magicNumber @langs $defaultLang %langName %charsetName %noWriteFile %magicNumber @langs $defaultLang %langName %charsetName
%mimeType $swapBytes $swapWords $currentByteOrder %unpackStd %mimeType $swapBytes $swapWords $currentByteOrder %unpackStd
%jpegMarker %specialTags %fileTypeLookup $testLen $exePath); %jpegMarker %specialTags %fileTypeLookup $testLen $exePath);
$VERSION = '12.26'; $VERSION = '12.27';
$RELEASE = ''; $RELEASE = '';
@ISA = qw(Exporter); @ISA = qw(Exporter);
%EXPORT_TAGS = ( %EXPORT_TAGS = (
# all public non-object-oriented functions: # all public non-object-oriented functions:
Public => [qw( Public => [qw(
ImageInfo GetTagName GetShortcuts GetAllTags GetWritableTags ImageInfo GetTagName GetShortcuts GetAllTags GetWritableTags
GetAllGroups GetDeleteGroups GetFileType CanWrite CanCreate GetAllGroups GetDeleteGroups GetFileType CanWrite CanCreate
AddUserDefinedTags AddUserDefinedTags
)], )],
# exports not part of the public API, but used by ExifTool modules: # exports not part of the public API, but used by ExifTool modules:
skipping to change at line 609 skipping to change at line 609
DCP => 'application/octet-stream', #PH (NC) DCP => 'application/octet-stream', #PH (NC)
DCR => 'image/x-kodak-dcr', DCR => 'image/x-kodak-dcr',
DCX => 'image/dcx', DCX => 'image/dcx',
DEX => 'application/octet-stream', DEX => 'application/octet-stream',
DFONT=> 'application/x-dfont', DFONT=> 'application/x-dfont',
DICOM=> 'application/dicom', DICOM=> 'application/dicom',
DIVX => 'video/divx', DIVX => 'video/divx',
DJVU => 'image/vnd.djvu', DJVU => 'image/vnd.djvu',
DNG => 'image/x-adobe-dng', DNG => 'image/x-adobe-dng',
DOC => 'application/msword', DOC => 'application/msword',
DOCM => 'application/vnd.ms-word.document.macroEnabled', DOCM => 'application/vnd.ms-word.document.macroEnabled.12',
DOCX => 'application/vnd.openxmlformats-officedocument.wordprocessingml.docu ment', DOCX => 'application/vnd.openxmlformats-officedocument.wordprocessingml.docu ment',
DOT => 'application/msword', DOT => 'application/msword',
DOTM => 'application/vnd.ms-word.template.macroEnabledTemplate', DOTM => 'application/vnd.ms-word.template.macroEnabledTemplate',
DOTX => 'application/vnd.openxmlformats-officedocument.wordprocessingml.temp late', DOTX => 'application/vnd.openxmlformats-officedocument.wordprocessingml.temp late',
DPX => 'image/x-dpx', DPX => 'image/x-dpx',
DR4 => 'application/octet-stream', #PH (NC) DR4 => 'application/octet-stream', #PH (NC)
DS2 => 'audio/x-ds2', DS2 => 'audio/x-ds2',
DSS => 'audio/x-dss', DSS => 'audio/x-dss',
DV => 'video/x-dv', DV => 'video/x-dv',
'DVR-MS' => 'video/x-ms-dvr', 'DVR-MS' => 'video/x-ms-dvr',
skipping to change at line 722 skipping to change at line 722
PEF => 'image/x-pentax-pef', PEF => 'image/x-pentax-pef',
PFA => 'application/x-font-type1', # (needed if handled by PostScript modul e) PFA => 'application/x-font-type1', # (needed if handled by PostScript modul e)
PGF => 'image/pgf', PGF => 'image/pgf',
PGM => 'image/x-portable-graymap', PGM => 'image/x-portable-graymap',
PHP => 'application/x-httpd-php', PHP => 'application/x-httpd-php',
PICT => 'image/pict', PICT => 'image/pict',
PLIST=> 'application/xml', # (binary PLIST format is 'application/x-plist', recognized at run time) PLIST=> 'application/xml', # (binary PLIST format is 'application/x-plist', recognized at run time)
PMP => 'image/x-sony-pmp', #PH (NC) PMP => 'image/x-sony-pmp', #PH (NC)
PNG => 'image/png', PNG => 'image/png',
POT => 'application/vnd.ms-powerpoint', POT => 'application/vnd.ms-powerpoint',
POTM => 'application/vnd.ms-powerpoint.template.macroEnabled', POTM => 'application/vnd.ms-powerpoint.template.macroEnabled.12',
POTX => 'application/vnd.openxmlformats-officedocument.presentationml.templa te', POTX => 'application/vnd.openxmlformats-officedocument.presentationml.templa te',
PPAM => 'application/vnd.ms-powerpoint.addin.macroEnabled', PPAM => 'application/vnd.ms-powerpoint.addin.macroEnabled.12',
PPAX => 'application/vnd.openxmlformats-officedocument.presentationml.addin' , # (NC, PH invented) PPAX => 'application/vnd.openxmlformats-officedocument.presentationml.addin' , # (NC, PH invented)
PPM => 'image/x-portable-pixmap', PPM => 'image/x-portable-pixmap',
PPS => 'application/vnd.ms-powerpoint', PPS => 'application/vnd.ms-powerpoint',
PPSM => 'application/vnd.ms-powerpoint.slideshow.macroEnabled', PPSM => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12',
PPSX => 'application/vnd.openxmlformats-officedocument.presentationml.slides how', PPSX => 'application/vnd.openxmlformats-officedocument.presentationml.slides how',
PPT => 'application/vnd.ms-powerpoint', PPT => 'application/vnd.ms-powerpoint',
PPTM => 'application/vnd.ms-powerpoint.presentation.macroEnabled', PPTM => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
PPTX => 'application/vnd.openxmlformats-officedocument.presentationml.presen tation', PPTX => 'application/vnd.openxmlformats-officedocument.presentationml.presen tation',
PS => 'application/postscript', PS => 'application/postscript',
PSD => 'application/vnd.adobe.photoshop', PSD => 'application/vnd.adobe.photoshop',
PSP => 'image/x-paintshoppro', #(NC) PSP => 'image/x-paintshoppro', #(NC)
QTIF => 'image/x-quicktime', QTIF => 'image/x-quicktime',
R3D => 'video/x-red-r3d', #PH (invented) R3D => 'video/x-red-r3d', #PH (invented)
RA => 'audio/x-pn-realaudio', RA => 'audio/x-pn-realaudio',
RAF => 'image/x-fujifilm-raf', RAF => 'image/x-fujifilm-raf',
RAM => 'audio/x-pn-realaudio', RAM => 'audio/x-pn-realaudio',
RAR => 'application/x-rar-compressed', RAR => 'application/x-rar-compressed',
skipping to change at line 778 skipping to change at line 778
VSD => 'application/x-visio', VSD => 'application/x-visio',
WDP => 'image/vnd.ms-photo', WDP => 'image/vnd.ms-photo',
WEBM => 'video/webm', WEBM => 'video/webm',
WMA => 'audio/x-ms-wma', WMA => 'audio/x-ms-wma',
WMF => 'application/x-wmf', WMF => 'application/x-wmf',
WMV => 'video/x-ms-wmv', WMV => 'video/x-ms-wmv',
WTV => 'video/x-ms-wtv', WTV => 'video/x-ms-wtv',
X3F => 'image/x-sigma-x3f', X3F => 'image/x-sigma-x3f',
XCF => 'image/x-xcf', XCF => 'image/x-xcf',
XLA => 'application/vnd.ms-excel', XLA => 'application/vnd.ms-excel',
XLAM => 'application/vnd.ms-excel.addin.macroEnabled', XLAM => 'application/vnd.ms-excel.addin.macroEnabled.12',
XLS => 'application/vnd.ms-excel', XLS => 'application/vnd.ms-excel',
XLSB => 'application/vnd.ms-excel.sheet.binary.macroEnabled', XLSB => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
XLSM => 'application/vnd.ms-excel.sheet.macroEnabled', XLSM => 'application/vnd.ms-excel.sheet.macroEnabled.12',
XLSX => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', XLSX => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
XLT => 'application/vnd.ms-excel', XLT => 'application/vnd.ms-excel',
XLTM => 'application/vnd.ms-excel.template.macroEnabled', XLTM => 'application/vnd.ms-excel.template.macroEnabled.12',
XLTX => 'application/vnd.openxmlformats-officedocument.spreadsheetml.templat e', XLTX => 'application/vnd.openxmlformats-officedocument.spreadsheetml.templat e',
XML => 'application/xml', XML => 'application/xml',
XMP => 'application/rdf+xml', XMP => 'application/rdf+xml',
ZIP => 'application/zip', ZIP => 'application/zip',
); );
# module names for processing routines of each file type # module names for processing routines of each file type
# - undefined entries default to same module name as file type # - undefined entries default to same module name as file type
# - module name '' defaults to Image::ExifTool # - module name '' defaults to Image::ExifTool
# - module name '0' indicates a recognized but unsupported file # - module name '0' indicates a recognized but unsupported file
skipping to change at line 3312 skipping to change at line 3312
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Get tag identification number # Get tag identification number
# Inputs: 0) ExifTool object reference, 1) tag key # Inputs: 0) ExifTool object reference, 1) tag key
# Returns: Scalar context: tag ID if available, otherwise '' # Returns: Scalar context: tag ID if available, otherwise ''
# List context: 0) tag ID (or ''), 1) language code (or undef) # List context: 0) tag ID (or ''), 1) language code (or undef)
sub GetTagID($$) sub GetTagID($$)
{ {
my ($self, $tag) = @_; my ($self, $tag) = @_;
my $tagInfo = $$self{TAG_INFO}{$tag}; my $tagInfo = $$self{TAG_INFO}{$tag};
return '' unless $tagInfo and defined $$tagInfo{TagID}; return '' unless $tagInfo and defined $$tagInfo{TagID};
return ($$tagInfo{TagID}, $$tagInfo{LangCode}) if wantarray; my $id = $$tagInfo{KeysID} || $$tagInfo{TagID};
return $$tagInfo{TagID}; return ($id, $$tagInfo{LangCode}) if wantarray;
return $id;
} }
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Get description for specified tag # Get description for specified tag
# Inputs: 0) ExifTool object reference, 1) tag key # Inputs: 0) ExifTool object reference, 1) tag key
# Returns: Tag description # Returns: Tag description
# Notes: Will always return a defined value, even if description isn't available # Notes: Will always return a defined value, even if description isn't available
sub GetDescription($$) sub GetDescription($$)
{ {
local $_; local $_;
skipping to change at line 3429 skipping to change at line 3430
$groups[1] = $$ex{G1} =~ /^\+(.*)/ ? "$groups[1]$1" : $$ex{G1} if $$ ex{G1}; $groups[1] = $$ex{G1} =~ /^\+(.*)/ ? "$groups[1]$1" : $$ex{G1} if $$ ex{G1};
$groups[3] = 'Doc' . $$ex{G3} if $$ex{G3}; $groups[3] = 'Doc' . $$ex{G3} if $$ex{G3};
$groups[5] = $$ex{G5} || $groups[1] if defined $$ex{G5}; $groups[5] = $$ex{G5} || $groups[1] if defined $$ex{G5};
if (defined $$ex{G6}) { if (defined $$ex{G6}) {
$groups[5] = '' unless defined $groups[5]; # (can't leave a hol e in the array) $groups[5] = '' unless defined $groups[5]; # (can't leave a hol e in the array)
$groups[6] = $$ex{G6}; $groups[6] = $$ex{G6};
} }
} }
# generate tag ID group names unless obviously not needed # generate tag ID group names unless obviously not needed
unless ($noID) { unless ($noID) {
my $id = $$tagInfo{TagID}; my $id = $$tagInfo{KeysID} || $$tagInfo{TagID};
if (not defined $id) { if (not defined $id) {
$id = ''; # (just to be safe) $id = ''; # (just to be safe)
} elsif ($id =~ /^\d+$/) { } elsif ($id =~ /^\d+$/) {
$id = sprintf('0x%x', $id) if $$self{OPTIONS}{HexTagIDs}; $id = sprintf('0x%x', $id) if $$self{OPTIONS}{HexTagIDs};
} else { } else {
$id =~ s/([^-_A-Za-z0-9])/sprintf('%.2x',ord $1)/ge; $id =~ s/([^-_A-Za-z0-9])/sprintf('%.2x',ord $1)/ge;
} }
$groups[7] = 'ID-' . $id; $groups[7] = 'ID-' . $id;
defined $groups[$_] or $groups[$_] = '' foreach (5,6); defined $groups[$_] or $groups[$_] = '' foreach (5,6);
} }
 End of changes. 11 change blocks. 
13 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)