1 | #------------------------------------------------------------------------------
|
---|
2 | # File: Nintendo.pm
|
---|
3 | #
|
---|
4 | # Description: Nintendo EXIF maker notes tags
|
---|
5 | #
|
---|
6 | # Revisions: 2014/03/25 - P. Harvey Created
|
---|
7 | #
|
---|
8 | # References: 1) http://3dbrew.org/wiki/MPO
|
---|
9 | #------------------------------------------------------------------------------
|
---|
10 |
|
---|
11 | package Image::ExifTool::Nintendo;
|
---|
12 |
|
---|
13 | use strict;
|
---|
14 | use vars qw($VERSION);
|
---|
15 | use Image::ExifTool::Exif;
|
---|
16 |
|
---|
17 | $VERSION = '1.00';
|
---|
18 |
|
---|
19 | %Image::ExifTool::Nintendo::Main = (
|
---|
20 | GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
|
---|
21 | WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
|
---|
22 | CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
|
---|
23 | WRITABLE => 1,
|
---|
24 | # 0x1000 - undef[28]
|
---|
25 | # 0x1001 - undef[8]
|
---|
26 | # 0x1100 - undef[80] (found in MPO files)
|
---|
27 | 0x1101 => {
|
---|
28 | Name => 'CameraInfo',
|
---|
29 | SubDirectory => {
|
---|
30 | TagTable => 'Image::ExifTool::Nintendo::CameraInfo',
|
---|
31 | ByteOrder => 'Little-endian',
|
---|
32 | },
|
---|
33 | },
|
---|
34 | );
|
---|
35 |
|
---|
36 | # Nintendo MPO info (ref 1)
|
---|
37 | %Image::ExifTool::Nintendo::CameraInfo = (
|
---|
38 | GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
|
---|
39 | PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
|
---|
40 | WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
|
---|
41 | CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
|
---|
42 | WRITABLE => 1,
|
---|
43 | PRIORITY => 0,
|
---|
44 | FORMAT => 'int8u',
|
---|
45 | FIRST_ENTRY => 0,
|
---|
46 | 0x00 => { # "3DS1"
|
---|
47 | Name => 'ModelID',
|
---|
48 | Format => 'undef[4]',
|
---|
49 | },
|
---|
50 | # 0x04 - int32u: 1,2,4,5
|
---|
51 | 0x08 => {
|
---|
52 | Name => 'TimeStamp',
|
---|
53 | Format => 'int32u',
|
---|
54 | Groups => { 2 => 'Time' },
|
---|
55 | Shift => 'Time',
|
---|
56 | # zero time is 2000/01/01 (10957 days after Unix time zero)
|
---|
57 | ValueConv => 'ConvertUnixTime($val + 10957 * 24 * 3600)',
|
---|
58 | ValueConvInv => 'GetUnixTime($val) - 10957 * 24 * 3600',
|
---|
59 | PrintConv => '$self->ConvertDateTime($val)',
|
---|
60 | PrintConvInv => '$self->InverseDateTime($val)',
|
---|
61 | },
|
---|
62 | # 0x10 - int32u: title ID low
|
---|
63 | # 0x14 - int32u: flags
|
---|
64 | 0x18 => {
|
---|
65 | Name => 'InternalSerialNumber',
|
---|
66 | Groups => { 2 => 'Camera' },
|
---|
67 | Format => 'undef[4]',
|
---|
68 | ValueConv => '"0x" . unpack("H*",$val)',
|
---|
69 | ValueConvInv => '$val=~s/^0x//; pack("H*",$val)',
|
---|
70 | },
|
---|
71 | 0x28 => {
|
---|
72 | Name => 'Parallax',
|
---|
73 | Format => 'float',
|
---|
74 | PrintConv => 'sprintf("%.2f", $val)',
|
---|
75 | PrintConvInv => '$val',
|
---|
76 | },
|
---|
77 | 0x30 => {
|
---|
78 | Name => 'Category',
|
---|
79 | Format => 'int16u',
|
---|
80 | PrintHex => 1,
|
---|
81 | PrintConv => {
|
---|
82 | 0x0000 => '(none)',
|
---|
83 | 0x1000 => 'Mii',
|
---|
84 | 0x2000 => 'Man',
|
---|
85 | 0x4000 => 'Woman',
|
---|
86 | },
|
---|
87 | },
|
---|
88 | # 0x32 - int16u: filter
|
---|
89 | );
|
---|
90 |
|
---|
91 | 1; # end
|
---|
92 |
|
---|
93 | __END__
|
---|
94 |
|
---|
95 | =head1 NAME
|
---|
96 |
|
---|
97 | Image::ExifTool::Nintendo - Nintendo EXIF maker notes tags
|
---|
98 |
|
---|
99 | =head1 SYNOPSIS
|
---|
100 |
|
---|
101 | This module is loaded automatically by Image::ExifTool when required.
|
---|
102 |
|
---|
103 | =head1 DESCRIPTION
|
---|
104 |
|
---|
105 | This module contains definitions required by Image::ExifTool to
|
---|
106 | interpret Nintendo maker notes EXIF meta information.
|
---|
107 |
|
---|
108 | =head1 AUTHOR
|
---|
109 |
|
---|
110 | Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
|
---|
111 |
|
---|
112 | This library is free software; you can redistribute it and/or modify it
|
---|
113 | under the same terms as Perl itself.
|
---|
114 |
|
---|
115 | =head1 REFERENCES
|
---|
116 |
|
---|
117 | =over 4
|
---|
118 |
|
---|
119 | =item L<http://3dbrew.org/wiki/MPO>
|
---|
120 |
|
---|
121 | =back
|
---|
122 |
|
---|
123 | =head1 SEE ALSO
|
---|
124 |
|
---|
125 | L<Image::ExifTool::TagNames/Nintendo Tags>,
|
---|
126 | L<Image::ExifTool(3pm)|Image::ExifTool>
|
---|
127 |
|
---|
128 | =cut
|
---|