/usr/share/perl5/Image/ExifTool/Sanyo.pm is in libimage-exiftool-perl 8.60-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 | #------------------------------------------------------------------------------
# File: Sanyo.pm
#
# Description: Sanyo EXIF maker notes tags
#
# Revisions: 04/06/2004 - P. Harvey Created
#
# Reference: http://www.exif.org/makernotes/SanyoMakerNote.html
#------------------------------------------------------------------------------
package Image::ExifTool::Sanyo;
use strict;
use vars qw($VERSION);
use Image::ExifTool::Exif;
$VERSION = '1.14';
my %offOn = (
0 => 'Off',
1 => 'On',
);
%Image::ExifTool::Sanyo::Main = (
WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
WRITABLE => 1,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
0x00ff => {
# this is an absolute offset in the JPG file... odd - PH
Name => 'MakerNoteOffset',
Writable => 'int32u',
},
0x0100 => {
Name => 'SanyoThumbnail',
Writable => 'undef',
WriteCheck => '$self->CheckImage(\$val)',
RawConv => '$self->ValidateImage(\$val,$tag)',
},
0x0200 => {
Name => 'SpecialMode',
Writable => 'int32u',
Count => 3,
},
0x0201 => {
Name => 'SanyoQuality',
Flags => 'PrintHex',
Writable => 'int16u',
PrintConv => {
0x0000 => 'Normal/Very Low',
0x0001 => 'Normal/Low',
0x0002 => 'Normal/Medium Low',
0x0003 => 'Normal/Medium',
0x0004 => 'Normal/Medium High',
0x0005 => 'Normal/High',
0x0006 => 'Normal/Very High',
0x0007 => 'Normal/Super High',
# have seen 0x11 with HD2000 in '8M-H JPEG' mode - PH
0x0100 => 'Fine/Very Low',
0x0101 => 'Fine/Low',
0x0102 => 'Fine/Medium Low',
0x0103 => 'Fine/Medium',
0x0104 => 'Fine/Medium High',
0x0105 => 'Fine/High',
0x0106 => 'Fine/Very High',
0x0107 => 'Fine/Super High',
0x0200 => 'Super Fine/Very Low',
0x0201 => 'Super Fine/Low',
0x0202 => 'Super Fine/Medium Low',
0x0203 => 'Super Fine/Medium',
0x0204 => 'Super Fine/Medium High',
0x0205 => 'Super Fine/High',
0x0206 => 'Super Fine/Very High',
0x0207 => 'Super Fine/Super High',
},
},
0x0202 => {
Name => 'Macro',
Writable => 'int16u',
PrintConv => {
0 => 'Normal',
1 => 'Macro',
2 => 'View',
3 => 'Manual',
},
},
0x0204 => {
Name => 'DigitalZoom',
Writable => 'rational64u',
},
0x0207 => 'SoftwareVersion',
0x0208 => 'PictInfo',
0x0209 => 'CameraID',
0x020e => {
Name => 'SequentialShot',
Writable => 'int16u',
PrintConv => {
0 => 'None',
1 => 'Standard',
2 => 'Best',
3 => 'Adjust Exposure',
},
},
0x020f => {
Name => 'WideRange',
Writable => 'int16u',
PrintConv => \%offOn,
},
0x0210 => {
Name => 'ColorAdjustmentMode',
Writable => 'int16u',
PrintConv => \%offOn,
},
0x0213 => {
Name => 'QuickShot',
Writable => 'int16u',
PrintConv => \%offOn,
},
0x0214 => {
Name => 'SelfTimer',
Writable => 'int16u',
PrintConv => \%offOn,
},
# 0x0215 - Flash?
0x0216 => {
Name => 'VoiceMemo',
Writable => 'int16u',
PrintConv => \%offOn,
},
0x0217 => {
Name => 'RecordShutterRelease',
Writable => 'int16u',
PrintConv => {
0 => 'Record while down',
1 => 'Press start, press stop',
},
},
0x0218 => {
Name => 'FlickerReduce',
Writable => 'int16u',
PrintConv => \%offOn,
},
0x0219 => {
Name => 'OpticalZoomOn',
Writable => 'int16u',
PrintConv => \%offOn,
},
0x021b => {
Name => 'DigitalZoomOn',
Writable => 'int16u',
PrintConv => \%offOn,
},
0x021d => {
Name => 'LightSourceSpecial',
Writable => 'int16u',
PrintConv => \%offOn,
},
0x021e => {
Name => 'Resaved',
Writable => 'int16u',
PrintConv => {
0 => 'No',
1 => 'Yes',
},
},
0x021f => {
Name => 'SceneSelect',
Writable => 'int16u',
PrintConv => {
0 => 'Off',
1 => 'Sport',
2 => 'TV',
3 => 'Night',
4 => 'User 1',
5 => 'User 2',
6 => 'Lamp', #PH
},
},
0x0223 => [
{
Name => 'ManualFocusDistance',
Condition => '$format eq "rational64u"',
Writable => 'rational64u',
}, { #PH
Name => 'FaceInfo',
SubDirectory => { TagTable => 'Image::ExifTool::Sanyo::FaceInfo' },
},
],
0x0224 => {
Name => 'SequenceShotInterval',
Writable => 'int16u',
PrintConv => {
0 => '5 frames/s',
1 => '10 frames/s',
2 => '15 frames/s',
3 => '20 frames/s',
},
},
0x0225 => {
Name => 'FlashMode',
Writable => 'int16u',
PrintConv => {
0 => 'Auto',
1 => 'Force',
2 => 'Disabled',
3 => 'Red eye',
},
},
0x0e00 => {
Name => 'PrintIM',
Description => 'Print Image Matching',
Writable => 0,
SubDirectory => {
TagTable => 'Image::ExifTool::PrintIM::Main',
},
},
0x0f00 => {
Name => 'DataDump',
Writable => 0,
Binary => 1,
},
);
# face detection information (ref PH)
%Image::ExifTool::Sanyo::FaceInfo = (
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
WRITABLE => 1,
FORMAT => 'int32u',
FIRST_ENTRY => 0,
0 => 'FacesDetected',
4 => {
Name => 'FacePosition',
Format => 'int32u[4]',
Notes => q{
left, top, right and bottom coordinates of detected face in an unrotated
640-pixel-wide image, with increasing Y downwards
},
},
);
# tags in Sanyo MOV videos (PH - observations from an E6 sample)
# (similar information in Kodak,Minolta,Nikon,Olympus,Pentax and Sanyo videos)
%Image::ExifTool::Sanyo::MOV = (
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
NOTES => 'This information is found in Sanyo MOV videos.',
0x00 => {
Name => 'Make',
Format => 'string[24]',
},
0x18 => {
Name => 'Model',
Description => 'Camera Model Name',
Format => 'string[8]',
},
# (01 00 at offset 0x20)
0x26 => {
Name => 'ExposureTime',
Format => 'int32u',
ValueConv => '$val ? 10 / $val : 0',
PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
},
0x2a => {
Name => 'FNumber',
Format => 'int32u',
ValueConv => '$val / 10',
PrintConv => 'sprintf("%.1f",$val)',
},
0x32 => {
Name => 'ExposureCompensation',
Format => 'int32s',
ValueConv => '$val / 10',
PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
},
0x44 => {
Name => 'WhiteBalance',
Format => 'int16u',
PrintConv => {
0 => 'Auto',
1 => 'Daylight',
2 => 'Shade',
3 => 'Fluorescent', #2
4 => 'Tungsten',
5 => 'Manual',
},
},
0x48 => {
Name => 'FocalLength',
Format => 'int32u',
ValueConv => '$val / 10',
PrintConv => 'sprintf("%.1f mm",$val)',
},
);
# tags in Sanyo MP4 videos (PH - from C4, C5 and HD1A samples)
# --> very similar to Samsung MP4 information
# (there is still a lot more information here that could be decoded!)
%Image::ExifTool::Sanyo::MP4 = (
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
NOTES => 'This information is found in Sanyo MP4 videos.',
0x00 => {
Name => 'Make',
Format => 'string[5]',
PrintConv => 'ucfirst(lc($val))',
},
0x18 => {
Name => 'Model',
Description => 'Camera Model Name',
Format => 'string[8]',
},
# (01 00 at offset 0x28)
# (0x2e has values 0x31, 0x33 and 0x3c in my samples, but
# some of the shutter speeds should be around 1/500 or so)
0x32 => {
Name => 'FNumber',
Format => 'rational64u',
PrintConv => 'sprintf("%.1f",$val)',
},
0x3a => { # (NC)
Name => 'ExposureCompensation',
Format => 'rational64s',
PrintConv => '$val ? sprintf("%+.1f", $val) : 0',
},
0x6a => {
Name => 'ISO',
Format => 'int32u',
},
0xd1 => {
Name => 'Software',
Notes => 'these tags are shifted up by 1 byte for some models like the HD1A',
Format => 'undef[32]',
RawConv => q{
$val =~ /^SANYO/ or return undef;
$val =~ tr/\0//d;
$$self{SanyoSledder0xd1} = 1;
return $val;
},
},
0xd2 => {
Name => 'Software',
Format => 'undef[32]',
RawConv => q{
$val =~ /^SANYO/ or return undef;
$val =~ tr/\0//d;
$$self{SanyoSledder0xd2} = 1;
return $val;
},
},
0xfd => {
Name => 'ThumbnailLength',
Condition => '$$self{SanyoSledder0xd1}',
Format => 'int32u',
},
0xfe => {
Name => 'ThumbnailLength',
Condition => '$$self{SanyoSledder0xd2}',
Format => 'int32u',
},
0x101 => {
Name => 'ThumbnailOffset',
Condition => '$$self{SanyoSledder0xd1}',
IsOffset => 1,
Format => 'int32u',
RawConv => '$val + 0xf1',
},
0x102 => {
Name => 'ThumbnailOffset',
Condition => '$$self{SanyoSledder0xd2}',
IsOffset => 1,
Format => 'int32u',
RawConv => '$val + 0xf2',
},
);
#------------------------------------------------------------------------------
# Patch incorrect offsets in J1, J2, J4, S1, S3 and S4 maker notes
# Inputs: 0) valuePtr, 1) end of previous value, 2) value size, 3) tag ID, 4) write flag
sub FixOffsets($$$$;$)
{
my ($valuePtr, $valEnd, $size, $tagID, $wFlag) = @_;
# ignore existing offsets and calculate reasonable values instead
if ($tagID == 0x100) {
# just ignore the SanyoThumbnail when writing (pointer is garbage)
$_[0] = undef if $wFlag;
} else {
$_[0] = $valEnd; # set value pointer to next logical location
++$size if $size & 0x01;
$_[1] += $size; # update end-of-value pointer
}
}
1; # end
__END__
=head1 NAME
Image::ExifTool::Sanyo - Sanyo EXIF maker notes tags
=head1 SYNOPSIS
This module is loaded automatically by Image::ExifTool when required.
=head1 DESCRIPTION
This module contains definitions required by Image::ExifTool to interpret
Sanyo maker notes in EXIF information.
=head1 AUTHOR
Copyright 2003-2011, Phil Harvey (phil at owl.phy.queensu.ca)
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
=head1 REFERENCES
=over 4
=item L<http://www.exif.org/makernotes/SanyoMakerNote.html>
=back
=head1 SEE ALSO
L<Image::ExifTool::TagNames/Sanyo Tags>,
L<Image::ExifTool(3pm)|Image::ExifTool>
=cut
|