- Timestamp:
- 2021-02-26T19:39:51+13:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/cpan/Image/ExifTool/FotoStation.pm
r24107 r34921 13 13 use Image::ExifTool qw(:DataAccess :Utils); 14 14 15 $VERSION = '1.0 0';15 $VERSION = '1.04'; 16 16 17 17 sub ProcessFotoStation($$); … … 39 39 0x03 => { 40 40 Name => 'ThumbnailImage', 41 Groups => { 2 => 'Preview' }, 41 42 Writable => 1, 42 43 RawConv => '$self->ValidateImage(\$val,$tag)', … … 44 45 0x04 => { 45 46 Name => 'PreviewImage', 47 Groups => { 2 => 'Preview' }, 46 48 Writable => 1, 47 49 RawConv => '$self->ValidateImage(\$val,$tag)', … … 119 121 sub ProcessFotoStation($$) 120 122 { 121 my ($e xifTool, $dirInfo) = @_;122 $e xifToolor return 1; # allow dummy access to autoload this package123 my ($et, $dirInfo) = @_; 124 $et or return 1; # allow dummy access to autoload this package 123 125 my ($buff, $footer, $dirBuff, $tagTablePtr); 124 126 my $raf = $$dirInfo{RAF}; 125 127 my $outfile = $$dirInfo{OutFile}; 126 128 my $offset = $$dirInfo{Offset} || 0; 127 my $verbose = $e xifTool->Options('Verbose');128 my $out = $e xifTool->Options('TextOut');129 my $verbose = $et->Options('Verbose'); 130 my $out = $et->Options('TextOut'); 129 131 my $rtnVal = 0; 130 132 … … 152 154 unless ($outfile) { 153 155 # print verbose trailer information 154 if ($verbose or $ exifTool->{HTML_DUMP}) {155 $e xifTool->DumpTrailer({156 if ($verbose or $$et{HTML_DUMP}) { 157 $et->DumpTrailer({ 156 158 RAF => $raf, 157 159 DataPos => $$dirInfo{DataPos}, … … 161 163 } 162 164 # extract information for this tag 163 $exifTool->HandleTag($tagTablePtr, $tag, $buff, 164 DataPt => \$buff, 165 Start => 0, 166 Size => $size, 167 DataPos => $$dirInfo{DataPos}); 165 $et->HandleTag($tagTablePtr, $tag, $buff, 166 DataPt => \$buff, 167 Start => 0, 168 Size => $size, 169 DataPos => $$dirInfo{DataPos}, 170 ); 168 171 next; 169 172 } 170 if ($ exifTool->{DEL_GROUP}->{FotoStation}) {171 $verbose and print f$out " Deleting FotoStation trailer\n";173 if ($$et{DEL_GROUP}{FotoStation}) { 174 $verbose and print $out " Deleting FotoStation trailer\n"; 172 175 $verbose = 0; # no more verbose messages after this 173 ++$ exifTool->{CHANGED};176 ++$$et{CHANGED}; 174 177 next; 175 178 } 176 179 # rewrite this information 177 my $tagInfo = $e xifTool->GetTagInfo($tagTablePtr, $tag);180 my $tagInfo = $et->GetTagInfo($tagTablePtr, $tag); 178 181 if ($tagInfo) { 179 182 my $newVal; … … 189 192 ); 190 193 my $subTable = GetTagTable($tagInfo->{SubDirectory}->{TagTable}); 191 $newVal = $e xifTool->WriteDirectory(\%subdirInfo, $subTable);194 $newVal = $et->WriteDirectory(\%subdirInfo, $subTable); 192 195 } else { 193 my $nvHash = $e xifTool->GetNewValueHash($tagInfo);194 if ( Image::ExifTool::IsOverwriting($nvHash) > 0) {195 $newVal = Image::ExifTool::GetNewValues($nvHash);196 my $nvHash = $et->GetNewValueHash($tagInfo); 197 if ($et->IsOverwriting($nvHash) > 0) { 198 $newVal = $et->GetNewValue($nvHash); 196 199 $newVal = '' unless defined $newVal; 197 200 if ($verbose > 1) { … … 200 203 print $out " + FotoStation:$tagName ($n bytes)\n" if $n; 201 204 } 202 ++$ exifTool->{CHANGED};205 ++$$et{CHANGED}; 203 206 } 204 207 } … … 241 244 =head1 AUTHOR 242 245 243 Copyright 2003-20 11, Phil Harvey (phil at owl.phy.queensu.ca)246 Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com) 244 247 245 248 This library is free software; you can redistribute it and/or modify it
Note:
See TracChangeset
for help on using the changeset viewer.