XMP.pm (Image-ExifTool-12.57) | : | XMP.pm (Image-ExifTool-12.58) | ||
---|---|---|---|---|
skipping to change at line 53 | skipping to change at line 53 | |||
package Image::ExifTool::XMP; | package Image::ExifTool::XMP; | |||
use strict; | use strict; | |||
use vars qw($VERSION $AUTOLOAD @ISA @EXPORT_OK %stdXlatNS %nsURI %latConv %longC onv | use vars qw($VERSION $AUTOLOAD @ISA @EXPORT_OK %stdXlatNS %nsURI %latConv %longC onv | |||
%dateTimeInfo %xmpTableDefaults %specialStruct %sDimensions %sArea % sColorant); | %dateTimeInfo %xmpTableDefaults %specialStruct %sDimensions %sArea % sColorant); | |||
use Image::ExifTool qw(:Utils); | use Image::ExifTool qw(:Utils); | |||
use Image::ExifTool::Exif; | use Image::ExifTool::Exif; | |||
use Image::ExifTool::GPS; | use Image::ExifTool::GPS; | |||
require Exporter; | require Exporter; | |||
$VERSION = '3.56'; | $VERSION = '3.57'; | |||
@ISA = qw(Exporter); | @ISA = qw(Exporter); | |||
@EXPORT_OK = qw(EscapeXML UnescapeXML); | @EXPORT_OK = qw(EscapeXML UnescapeXML); | |||
sub ProcessXMP($$;$); | sub ProcessXMP($$;$); | |||
sub WriteXMP($$;$); | sub WriteXMP($$;$); | |||
sub CheckXMP($$$;$); | sub CheckXMP($$$;$); | |||
sub ParseXMPElement($$$;$$$$); | sub ParseXMPElement($$$;$$$$); | |||
sub DecodeBase64($); | sub DecodeBase64($); | |||
sub EncodeBase64($;$); | sub EncodeBase64($;$); | |||
sub SaveBlankInfo($$$;$); | sub SaveBlankInfo($$$;$); | |||
skipping to change at line 3100 | skipping to change at line 3100 | |||
$buff = substr($xmp, pos($xmp)); # save data after end of XMP | $buff = substr($xmp, pos($xmp)); # save data after end of XMP | |||
$xmp = substr($xmp, 0, pos($xmp)); # isolate XMP | $xmp = substr($xmp, 0, pos($xmp)); # isolate XMP | |||
# check XMP for validity (not valid if it contains null bytes) | # check XMP for validity (not valid if it contains null bytes) | |||
$pos = rindex($xmp, "\0") + 1 or last; | $pos = rindex($xmp, "\0") + 1 or last; | |||
$lastBuff = substr($xmp, $pos); # re-parse beginning after last null byte | $lastBuff = substr($xmp, $pos); # re-parse beginning after last null byte | |||
undef $xmp; | undef $xmp; | |||
} else { | } else { | |||
undef $buff; | undef $buff; | |||
} | } | |||
} | } | |||
unless ($$et{VALUE}{FileType}) { | unless ($$et{FileType}) { | |||
$$et{FILE_TYPE} = $$et{FILE_EXT}; | $$et{FILE_TYPE} = $$et{FILE_EXT}; | |||
$et->SetFileType('<unknown file containing XMP>', undef, ''); | $et->SetFileType('<unknown file containing XMP>', undef, ''); | |||
} | } | |||
my %dirInfo = ( | my %dirInfo = ( | |||
DataPt => \$xmp, | DataPt => \$xmp, | |||
DirLen => length $xmp, | DirLen => length $xmp, | |||
DataLen => length $xmp, | DataLen => length $xmp, | |||
); | ); | |||
ProcessXMP($et, \%dirInfo); | ProcessXMP($et, \%dirInfo); | |||
return 1; | return 1; | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |