"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Image/ExifTool/WriteExif.pl" between
Image-ExifTool-12.57.tar.gz and Image-ExifTool-12.58.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.

WriteExif.pl  (Image-ExifTool-12.57):WriteExif.pl  (Image-ExifTool-12.58)
skipping to change at line 423 skipping to change at line 423
# (but make it minor to allow the file to be written anyway) # (but make it minor to allow the file to be written anyway)
$et->Error($msg, 1); $et->Error($msg, 1);
} else { } else {
$et->Warn($msg, $minor); $et->Warn($msg, $minor);
} }
} }
} }
} }
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Add specified image data to ImageDataMD5 hash
# Inputs: 0) ExifTool ref, 1) dirInfo ref, 2) lookup for [tagInfo,value] based o
n tagID
sub AddImageDataMD5($$$)
{
my ($et, $dirInfo, $offsetInfo) = @_;
my ($tagID, $offset, $buff);
my $verbose = $et->Options('Verbose');
my $md5 = $$et{ImageDataMD5};
my $raf = $$dirInfo{RAF};
my $base = $$dirInfo{Base} || 0;
foreach $tagID (sort keys %$offsetInfo) {
next unless ref $$offsetInfo{$tagID} eq 'ARRAY'; # ignore scalar tag val
ues used for Validate
my $tagInfo = $$offsetInfo{$tagID}[0];
next unless $$tagInfo{IsImageData} and $$tagInfo{OffsetPair}; # only con
sider image data
my $sizeID = $$tagInfo{OffsetPair};
next unless $sizeID and $$offsetInfo{$sizeID};
my @offsets = split ' ', $$offsetInfo{$tagID}[1];
my @sizes = split ' ', $$offsetInfo{$sizeID}[1];
my $total = 0;
foreach $offset (@offsets) {
my $size = shift @sizes;
next unless $offset =~ /^\d+$/ and $size and $size =~ /^\d+$/ and $s
ize;
next unless $raf->Seek($offset+$base, 0);
while ($size) {
my $bytes = $size > 65536 ? 65536 : $size;
$raf->Read($buff, $bytes) or last;
$md5->add($buff);
$total += length($buff);
$size -= $bytes;
}
}
if ($verbose) {
my $name = "$$dirInfo{DirName}:$$tagInfo{Name}";
$name =~ s/Offsets|Start$//;
$et->VPrint(0, "$$et{INDENT}(ImageDataMD5: $total bytes of $name dat
a)\n");
}
}
}
#------------------------------------------------------------------------------
# Handle error while writing EXIF # Handle error while writing EXIF
# Inputs: 0) ExifTool ref, 1) error string, 2) tag table ref # Inputs: 0) ExifTool ref, 1) error string, 2) tag table ref
# Returns: undef on fatal error, or '' if minor error is ignored # Returns: undef on fatal error, or '' if minor error is ignored
sub ExifErr($$$) sub ExifErr($$$)
{ {
my ($et, $errStr, $tagTablePtr) = @_; my ($et, $errStr, $tagTablePtr) = @_;
# MakerNote errors are minor by default # MakerNote errors are minor by default
my $minor = ($$tagTablePtr{GROUPS}{0} eq 'MakerNotes' or $$et{FILE_TYPE} eq 'MOV'); my $minor = ($$tagTablePtr{GROUPS}{0} eq 'MakerNotes' or $$et{FILE_TYPE} eq 'MOV');
if ($$tagTablePtr{VARS} and $$tagTablePtr{VARS}{MINOR_ERRORS}) { if ($$tagTablePtr{VARS} and $$tagTablePtr{VARS}{MINOR_ERRORS}) {
$et->Warn("$errStr. IFD dropped.") and return '' if $minor; $et->Warn("$errStr. IFD dropped.") and return '' if $minor;
 End of changes. 1 change blocks. 
0 lines changed or deleted 47 lines changed or added

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