source: gsdl/trunk/perllib/cpan/Image/ExifTool/Sigma.pm@ 16842

Last change on this file since 16842 was 16842, checked in by davidb, 16 years ago

ExifTool added to cpan area to support metadata extraction from files such as JPEG. Primarily targetted as Image files (hence the Image folder name decided upon by the ExifTool author) it also can handle video such as flash and audio such as Wav

File size: 6.7 KB
Line 
1#------------------------------------------------------------------------------
2# File: Sigma.pm
3#
4# Description: Sigma/Foveon EXIF maker notes tags
5#
6# Revisions: 04/06/2004 - P. Harvey Created
7# 02/20/2007 - PH added SD14 tags
8#
9# Reference: http://www.x3f.info/technotes/FileDocs/MakerNoteDoc.html
10#------------------------------------------------------------------------------
11
12package Image::ExifTool::Sigma;
13
14use strict;
15use vars qw($VERSION);
16use Image::ExifTool::Exif;
17
18$VERSION = '1.04';
19
20%Image::ExifTool::Sigma::Main = (
21 WRITE_PROC => \&Image::ExifTool::Exif::WriteExif,
22 CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
23 WRITABLE => 'string',
24 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
25 0x0002 => 'SerialNumber',
26 0x0003 => 'DriveMode',
27 0x0004 => 'ResolutionMode',
28 0x0005 => 'AFMode',
29 0x0006 => 'FocusSetting',
30 0x0007 => 'WhiteBalance',
31 0x0008 => {
32 Name => 'ExposureMode',
33 PrintConv => { #PH
34 A => 'Aperture-priority AE',
35 M => 'Manual',
36 P => 'Program AE',
37 S => 'Shutter speed priority AE',
38 },
39 },
40 0x0009 => {
41 Name => 'MeteringMode',
42 PrintConv => { #PH
43 A => 'Average',
44 C => 'Center-weighted average',
45 8 => 'Multi-segment',
46 },
47 },
48 0x000a => 'Lens',
49 0x000b => 'ColorSpace',
50 0x000c => [
51 {
52 Name => 'ExposureCompensation',
53 Condition => '$$self{CameraModel} !~ /SD14$/',
54 ValueConv => '$val =~ s/Expo:\s*//, $val',
55 ValueConvInv => 'IsFloat($val) ? sprintf("Expo:%+.1f",$val) : undef',
56 },
57 { #PH
58 Name => 'UnknownCompensation',
59 Writable => 'rational64s',
60 Unknown => 1,
61 },
62 ],
63 0x000d => [
64 {
65 Name => 'Contrast',
66 Condition => '$$self{CameraModel} !~ /SD14$/',
67 ValueConv => '$val =~ s/Cont:\s*//, $val',
68 ValueConvInv => 'IsFloat($val) ? sprintf("Cont:%+.1f",$val) : undef',
69 },
70 { #PH
71 Name => 'Contrast',
72 Writable => 'rational64s',
73 },
74 ],
75 0x000e => [
76 {
77 Name => 'Shadow',
78 Condition => '$$self{CameraModel} !~ /SD14$/',
79 ValueConv => '$val =~ s/Shad:\s*//, $val',
80 ValueConvInv => 'IsFloat($val) ? sprintf("Shad:%+.1f",$val) : undef',
81 },
82 { #PH
83 Name => 'Shadow',
84 Writable => 'rational64s',
85 },
86 ],
87 0x000f => [
88 {
89 Name => 'Highlight',
90 Condition => '$$self{CameraModel} !~ /SD14$/',
91 ValueConv => '$val =~ s/High:\s*//, $val',
92 ValueConvInv => 'IsFloat($val) ? sprintf("High:%+.1f",$val) : undef',
93 },
94 { #PH
95 Name => 'Highlight',
96 Writable => 'rational64s',
97 },
98 ],
99 0x0010 => [
100 {
101 Name => 'Saturation',
102 Condition => '$$self{CameraModel} !~ /SD14$/',
103 ValueConv => '$val =~ s/Satu:\s*//, $val',
104 ValueConvInv => 'IsFloat($val) ? sprintf("Satu:%+.1f",$val) : undef',
105 },
106 { #PH
107 Name => 'Saturation',
108 Writable => 'rational64s',
109 },
110 ],
111 0x0011 => [
112 {
113 Name => 'Sharpness',
114 Condition => '$$self{CameraModel} !~ /SD14$/',
115 ValueConv => '$val =~ s/Shar:\s*//, $val',
116 ValueConvInv => 'IsFloat($val) ? sprintf("Shar:%+.1f",$val) : undef',
117 },
118 { #PH
119 Name => 'Sharpness',
120 Writable => 'rational64s',
121 },
122 ],
123 0x0012 => [
124 {
125 Name => 'X3FillLight',
126 Condition => '$$self{CameraModel} !~ /SD14$/',
127 ValueConv => '$val =~ s/Fill:\s*//, $val',
128 ValueConvInv => 'IsFloat($val) ? sprintf("Fill:%+.1f",$val) : undef',
129 },
130 { #PH
131 Name => 'X3FillLight',
132 Writable => 'rational64s',
133 },
134 ],
135 0x0014 => [
136 {
137 Name => 'ColorAdjustment',
138 Condition => '$$self{CameraModel} !~ /SD14$/',
139 ValueConv => '$val =~ s/CC:\s*//, $val',
140 ValueConvInv => 'IsInt($val) ? "CC:$val" : undef',
141 },
142 { #PH
143 Name => 'ColorAdjustment',
144 Writable => 'rational64s',
145 Count => 3,
146 },
147 ],
148 0x0015 => 'AdjustmentMode',
149 0x0016 => {
150 Name => 'Quality',
151 ValueConv => '$val =~ s/Qual:\s*//, $val',
152 ValueConvInv => 'IsInt($val) ? "Qual:$val" : undef',
153 },
154 0x0017 => 'Firmware',
155 0x0018 => 'Software',
156 0x0019 => 'AutoBracket',
157 # 0x001a - int32u: 1884 to 2016
158 # 0x001b - int32u: 20688 to 45335
159 # 0x001c - int16u[2]: "640 480"
160 0x001d => { #PH
161 Name => 'MakerNoteVersion',
162 Format => 'undef',
163 },
164 # 0x001e - int16u: 0
165 # 0x001f - string: ""
166 # 0x0020-21 - string: " "
167 0x0022 => { #PH
168 Name => 'AdjustmentMode',
169 Priority => 0,
170 Unknown => 1,
171 },
172 # 0x0023 - string: 10, 131, 150, 152, 169
173 # 0x0024-25 - string: ""
174 # 0x0026-2e - int32u: 0
175 # 0x002f - int32u: 0, 1
176 0x0030 => 'LensApertureRange', #PH
177 0x0031 => { #PH
178 Name => 'FNumber',
179 Writable => 'rational64u',
180 PrintConv => 'sprintf("%.1f",$val)',
181 PrintConvInv => '$val',
182 },
183 0x0032 => { #PH
184 Name => 'ExposureTime',
185 Writable => 'rational64u',
186 PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
187 PrintConvInv => 'eval $val',
188 },
189 # 0x0033 - string: "3909" to "12337687"
190 # 0x0034 - int32u: 0,1,2,3 or 4 (possibly AFPoint?)
191 0x0035 => { #PH
192 Name => 'ExposureCompensation',
193 Writable => 'rational64s',
194 },
195 # 0x0036 - string: " "
196 # 0x0037-39 - string: ""
197 0x003a => { #PH (guess!)
198 Name => 'FlashExposureComp',
199 Writable => 'rational64s',
200 },
201 0x003b => { #PH (how is this different from other Firmware?)
202 Name => 'Firmware',
203 Priority => 0,
204 },
205 0x003c => 'WhiteBalance', #PH
206);
207
2081; # end
209
210__END__
211
212=head1 NAME
213
214Image::ExifTool::Sigma - Sigma/Foveon EXIF maker notes tags
215
216=head1 SYNOPSIS
217
218This module is loaded automatically by Image::ExifTool when required.
219
220=head1 DESCRIPTION
221
222This module contains definitions required by Image::ExifTool to interpret
223Sigma and Foveon maker notes in EXIF information.
224
225=head1 AUTHOR
226
227Copyright 2003-2007, Phil Harvey (phil at owl.phy.queensu.ca)
228
229This library is free software; you can redistribute it and/or modify it
230under the same terms as Perl itself.
231
232=head1 REFERENCES
233
234=over 4
235
236=item L<http://www.x3f.info/technotes/FileDocs/MakerNoteDoc.html>
237
238=back
239
240=head1 SEE ALSO
241
242L<Image::ExifTool::TagNames/Sigma Tags>,
243L<Image::ExifTool(3pm)|Image::ExifTool>
244
245=cut
Note: See TracBrowser for help on using the repository browser.