Stim.pm 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. #------------------------------------------------------------------------------
  2. # File: Stim.pm
  3. #
  4. # Description: Definitions for Stereo Still Image tags
  5. #
  6. # Revisions: 06/12/2009 - P. Harvey Created
  7. #
  8. # References: 1) http://www.cipa.jp/std/documents/e/DC-006_E.pdf
  9. #------------------------------------------------------------------------------
  10. package Image::ExifTool::Stim;
  11. use strict;
  12. use vars qw($VERSION);
  13. $VERSION = '1.01';
  14. # Tags found in Stim APP3 segment in JPEG images
  15. %Image::ExifTool::Stim::Main = (
  16. GROUPS => { 0 => 'Stim', 1 => 'Stim', 2 => 'Image'},
  17. NOTES => q{
  18. These tags are part of the CIPA Stereo Still Image specification, and are
  19. found in the APP3 "Stim" segment of JPEG images. See
  20. L<http://www.cipa.jp/std/documents/e/DC-006_E.pdf> for the
  21. official specification.
  22. },
  23. 0 => 'StimVersion',
  24. 1 => {
  25. Name => 'ApplicationData',
  26. Binary => 1,
  27. },
  28. 2 => {
  29. Name => 'ImageArrangement',
  30. PrintConv => {
  31. 0 => 'Parallel View Alignment',
  32. 1 => 'Cross View Alignment',
  33. },
  34. },
  35. 3 => {
  36. Name => 'ImageRotation',
  37. PrintConv => {
  38. 1 => 'None',
  39. },
  40. },
  41. 4 => 'ScalingFactor',
  42. 5 => 'CropXSize',
  43. 6 => 'CropYSize',
  44. 7 => {
  45. Name => 'CropX',
  46. SubDirectory => {
  47. TagTable => 'Image::ExifTool::Stim::CropX',
  48. },
  49. },
  50. 8 => {
  51. Name => 'CropY',
  52. SubDirectory => {
  53. TagTable => 'Image::ExifTool::Stim::CropY',
  54. },
  55. },
  56. 9 => {
  57. Name => 'ViewType',
  58. PrintConv => {
  59. 0 => 'No Pop-up Effect',
  60. 1 => 'Pop-up Effect',
  61. },
  62. },
  63. 10 => {
  64. Name => 'RepresentativeImage',
  65. PrintConv => {
  66. 0 => 'Left Viewpoint',
  67. 1 => 'Right Viewpoint',
  68. },
  69. },
  70. 11 => {
  71. Name => 'ConvergenceBaseImage',
  72. PrintConv => {
  73. 0 => 'Left Viewpoint',
  74. 1 => 'Right Viewpoint',
  75. 255 => 'Equivalent for Both Viewpoints',
  76. },
  77. },
  78. 12 => {
  79. Name => 'AssumedDisplaySize',
  80. PrintConv => '"$val mm"',
  81. },
  82. 13 => {
  83. Name => 'AssumedDistanceView',
  84. PrintConv => '"$val mm"',
  85. },
  86. 14 => 'RepresentativeDisparityNear',
  87. 15 => 'RepresentativeDisparityFar',
  88. 16 => {
  89. Name => 'InitialDisplayEffect',
  90. PrintConv => {
  91. 0 => 'Off',
  92. 1 => 'On',
  93. },
  94. },
  95. 17 => {
  96. Name => 'ConvergenceDistance',
  97. PrintConv => '$val ? "$val mm" : "inf"',
  98. },
  99. 18 => {
  100. Name => 'CameraArrangementInterval',
  101. PrintConv => '"$val mm"',
  102. },
  103. 19 => 'ShootingCount',
  104. );
  105. # crop offset X tags
  106. %Image::ExifTool::Stim::CropX = (
  107. PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
  108. GROUPS => { 0 => 'Stim', 1 => 'Stim', 2 => 'Image'},
  109. 0 => {
  110. Name => 'CropXCommonOffset',
  111. Format => 'int16u',
  112. PrintConv => {
  113. 0 => 'Common Offset Setting',
  114. 1 => 'Individual Offset Setting',
  115. },
  116. },
  117. 2 => 'CropXViewpointNumber',
  118. 3 => {
  119. Name => 'CropXOffset',
  120. Format => 'int32s',
  121. },
  122. 7 => 'CropXViewpointNumber2',
  123. 8 => {
  124. Name => 'CropXOffset2',
  125. Format => 'int32s',
  126. },
  127. );
  128. # crop offset Y tags
  129. %Image::ExifTool::Stim::CropY = (
  130. PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
  131. GROUPS => { 0 => 'Stim', 1 => 'Stim', 2 => 'Image'},
  132. 0 => {
  133. Name => 'CropYCommonOffset',
  134. Format => 'int16u',
  135. PrintConv => {
  136. 0 => 'Common Offset Setting',
  137. 1 => 'Individual Offset Setting',
  138. },
  139. },
  140. 2 => 'CropYViewpointNumber',
  141. 3 => {
  142. Name => 'CropYOffset',
  143. Format => 'int32s',
  144. },
  145. 7 => 'CropYViewpointNumber2',
  146. 8 => {
  147. Name => 'CropYOffset2',
  148. Format => 'int32s',
  149. },
  150. );
  151. 1; # end
  152. __END__
  153. =head1 NAME
  154. Image::ExifTool::Stim - Definitions for Stereo Still Image tags
  155. =head1 SYNOPSIS
  156. This module is used by Image::ExifTool
  157. =head1 DESCRIPTION
  158. This module contains tag definitions for Stereo Still Image format (Stim)
  159. information.
  160. =head1 AUTHOR
  161. Copyright 2003-2016, Phil Harvey (phil at owl.phy.queensu.ca)
  162. This library is free software; you can redistribute it and/or modify it
  163. under the same terms as Perl itself.
  164. =head1 REFERENCES
  165. =over 4
  166. =item L<http://www.cipa.jp/std/documents/e/DC-006_E.pdf>
  167. =back
  168. =head1 SEE ALSO
  169. L<Image::ExifTool::TagNames/Stim Tags>,
  170. L<Image::ExifTool(3pm)|Image::ExifTool>
  171. =cut