Source for file PelTag.php

Documentation is available at PelTag.php

  1. <?php
  2.  
  3. /*  PEL: PHP Exif Library.  A library with support for reading and
  4.  *  writing all Exif headers in JPEG and TIFF images using PHP.
  5.  *
  6.  *  Copyright (C) 2004, 2005, 2006, 2007  Martin Geisler.
  7.  *
  8.  *  This program is free software; you can redistribute it and/or modify
  9.  *  it under the terms of the GNU General Public License as published by
  10.  *  the Free Software Foundation; either version 2 of the License, or
  11.  *  (at your option) any later version.
  12.  *
  13.  *  This program is distributed in the hope that it will be useful,
  14.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.  *  GNU General Public License for more details.
  17.  *
  18.  *  You should have received a copy of the GNU General Public License
  19.  *  along with this program in the file COPYING; if not, write to the
  20.  *  Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
  21.  *  Boston, MA 02110-1301 USA
  22.  */
  23.  
  24. /* $Id$ */
  25.  
  26.  
  27. /**
  28.  * Namespace for functions operating on Exif tags.
  29.  *
  30.  * @author Martin Geisler <mgeisler@users.sourceforge.net>
  31.  * @version $Revision$
  32.  * @date $Date$
  33.  * @license http://www.gnu.org/licenses/gpl.html GNU General Public
  34.  *  License (GPL)
  35.  * @package PEL
  36.  */
  37.  
  38. /**#@+ Required class definitions. */
  39. require_once('Pel.php');
  40. require_once('PelIfd.php');
  41. /**#@-*/
  42.  
  43.  
  44. /**
  45.  * Class with static methods for Exif tags.
  46.  *
  47.  * This class defines the constants that represents the Exif tags
  48.  * known to PEL.  They are supposed to be used whenever one needs to
  49.  * specify an Exif tag, and they will be denoted by the pseudo-type
  50.  * {@link PelTag} throughout the documentation.
  51.  *
  52.  * Please note that the constrains on the format and number of
  53.  * components given here are advisory only.  To follow the Exif
  54.  * specification one should obey them, but there is nothing that
  55.  * prevents you from creating an {@link IMAGE_LENGTH} entry with two
  56.  * or more components, even though the standard says that there should
  57.  * be exactly one component.
  58.  *
  59.  * All the methods in this class are static and should be called with
  60.  * the Exif tag on which they should operate.
  61.  *
  62.  * @author Martin Geisler <mgeisler@users.sourceforge.net>
  63.  * @package PEL
  64.  */
  65. class PelTag {
  66.  
  67.   /**
  68.    * Interoperability index.
  69.    *
  70.    * Format: {@link PelFormat::ASCII}.
  71.    *
  72.    * Components: 4.
  73.    */
  74.   const INTEROPERABILITY_INDEX                            0x0001;
  75.  
  76.   /**
  77.    * Interoperability version.
  78.    *
  79.    * Format: {@link PelFormat::UNDEFINED}.
  80.    *
  81.    * Components: 4.
  82.    */
  83.   const INTEROPERABILITY_VERSION                          0x0002;
  84.  
  85.   /**
  86.    * Image width.
  87.    *
  88.    * Format: {@link PelFormat::SHORT} or {@link PelFormat::LONG}.
  89.    *
  90.    * Components: 1.
  91.    */
  92.   const IMAGE_WIDTH                                       0x0100;
  93.  
  94.   /**
  95.    * Image length.
  96.    *
  97.    * Format: {@link PelFormat::SHORT} or {@link PelFormat::LONG}.
  98.    *
  99.    * Components: 1.
  100.    */
  101.   const IMAGE_LENGTH                                      0x0101;
  102.  
  103.   /**
  104.    * Number of bits per component.
  105.    *
  106.    * Format: {@link PelFormat::SHORT}.
  107.    *
  108.    * Components: 3.
  109.    */
  110.   const BITS_PER_SAMPLE                                   0x0102;
  111.  
  112.   /**
  113.    * Compression scheme.
  114.    *
  115.    * Format: {@link PelFormat::SHORT}.
  116.    *
  117.    * Components: 1.
  118.    */
  119.   const COMPRESSION                                       0x0103;
  120.  
  121.   /**
  122.    * Pixel composition.
  123.    *
  124.    * Format: {@link PelFormat::SHORT}.
  125.    *
  126.    * Components: 1.
  127.    */
  128.   const PHOTOMETRIC_INTERPRETATION                        0x0106;
  129.  
  130.   /**
  131.    * Fill Orde
  132.    *
  133.    * Format: Unknown.
  134.    *
  135.    * Components: Unknown.
  136.    */
  137.   const FILL_ORDER                                        0x010A;
  138.  
  139.   /**
  140.    * Document Name
  141.    *
  142.    * Format: Unknown.
  143.    *
  144.    * Components: Unknown.
  145.    */
  146.   const DOCUMENT_NAME                                     0x010D;
  147.  
  148.   /**
  149.    * Image Description
  150.    *
  151.    * Format: {@link PelEntryAscii}.
  152.    *
  153.    * Components: any number.
  154.    */
  155.   const IMAGE_DESCRIPTION                                 0x010E;
  156.  
  157.   /**
  158.    * Manufacturer
  159.    *
  160.    * Format: {@link PelEntryAscii}.
  161.    *
  162.    * Components: any number.
  163.    */
  164.   const MAKE                                              0x010F;
  165.  
  166.   /**
  167.    * Model
  168.    *
  169.    * Format: {@link PelFormat::ASCII}.
  170.    *
  171.    * Components: any number.
  172.    */
  173.   const MODEL                                             0x0110;
  174.  
  175.   /**
  176.    * Strip Offsets
  177.    *
  178.    * Format: {@link PelFormat::SHORT} or {@link PelFormat::LONG}.
  179.    *
  180.    * Components: any number.
  181.    */
  182.   const STRIP_OFFSETS                                     0x0111;
  183.  
  184.   /**
  185.    * Orientation of image.
  186.    *
  187.    * Format: {@link PelFormat::SHORT}.
  188.    *
  189.    * Components: 1.
  190.    */
  191.   const ORIENTATION                                       0x0112;
  192.  
  193.   /**
  194.    * Number of components.
  195.    *
  196.    * Format: {@link PelFormat::SHORT}.
  197.    *
  198.    * Components: 1.
  199.    */
  200.   const SAMPLES_PER_PIXEL                                 0x0115;
  201.  
  202.   /**
  203.    * Rows per Strip
  204.    *
  205.    * Format: {@link PelFormat::SHORT} or {@link PelFormat::LONG}.
  206.    *
  207.    * Components: 1.
  208.    */
  209.   const ROWS_PER_STRIP                                    0x0116;
  210.  
  211.   /**
  212.    * Strip Byte Count
  213.    *
  214.    * Format: {@link PelFormat::SHORT} or {@link PelFormat::LONG}.
  215.    *
  216.    * Components: any number.
  217.    */
  218.   const STRIP_BYTE_COUNTS                                 0x0117;
  219.  
  220.   /**
  221.    * Image resolution in width direction.
  222.    *
  223.    * Format: {@link PelFormat::RATIONAL}.
  224.    *
  225.    * Components: 1.
  226.    */
  227.   const X_RESOLUTION                                      0x011A;
  228.  
  229.   /**
  230.    * Image resolution in height direction.
  231.    *
  232.    * Format: {@link PelFormat::RATIONAL}.
  233.    *
  234.    * Components: 1.
  235.    */
  236.   const Y_RESOLUTION                                      0x011B;
  237.  
  238.   /**
  239.    * Image data arrangement.
  240.    *
  241.    * Format: {@link PelFormat::SHORT}.
  242.    *
  243.    * Components: 1.
  244.    */
  245.   const PLANAR_CONFIGURATION                              0x011C;
  246.  
  247.   /**
  248.    * Unit of X and Y resolution.
  249.    *
  250.    * Format: {@link PelFormat::SHORT}.
  251.    *
  252.    * Components: 1.
  253.    */
  254.   const RESOLUTION_UNIT                                   0x0128;
  255.  
  256.   /**
  257.    * Transfer function.
  258.    *
  259.    * Format: {@link PelFormat::SHORT}.
  260.    *
  261.    * Components: 3.
  262.    */
  263.   const TRANSFER_FUNCTION                                 0x012D;
  264.  
  265.   /**
  266.    * Software used.
  267.    *
  268.    * Format: {@link PelFormat::ASCII}.
  269.    *
  270.    * Components: any number.
  271.    */
  272.   const SOFTWARE                                          0x0131;
  273.  
  274.   /**
  275.    * File change date and time.
  276.    *
  277.    * Format: {@link PelFormat::ASCII}, modelled by the {@link }
  278.    * PelEntryTime} class.
  279.    *
  280.    * Components: 20.
  281.    */
  282.   const DATE_TIME                                         0x0132;
  283.  
  284.   /**
  285.    * Person who created the image.
  286.    *
  287.    * Format: {@link PelFormat::ASCII}.
  288.    *
  289.    * Components: any number.
  290.    */
  291.   const ARTIST                                            0x013B;
  292.  
  293.   /**
  294.    * White point chromaticity.
  295.    *
  296.    * Format: {@link PelFormat::RATIONAL}.
  297.    *
  298.    * Components: 2.
  299.    */
  300.   const WHITE_POINT                                       0x013E;
  301.  
  302.   /**
  303.    * Chromaticities of primaries.
  304.    *
  305.    * Format: {@link PelFormat::RATIONAL}.
  306.    *
  307.    * Components: 6.
  308.    */
  309.   const PRIMARY_CHROMATICITIES                            0x013F;
  310.  
  311.   /**
  312.    * Transfer Range
  313.    *
  314.    * Format: Unknown.
  315.    *
  316.    * Components: Unknown.
  317.    */
  318.   const TRANSFER_RANGE                                    0x0156;
  319.  
  320.   /**
  321.    * JPEGProc
  322.    *
  323.    * Format: Unknown.
  324.    *
  325.    * Components: Unknown.
  326.    */
  327.   const JPEG_PROC                                         0x0200;
  328.  
  329.   /**
  330.    * Offset to JPEG SOI.
  331.    *
  332.    * Format: {@link PelFormat::LONG}.
  333.    *
  334.    * Components: 1.
  335.    */
  336.   const JPEG_INTERCHANGE_FORMAT                           0x0201;
  337.  
  338.   /**
  339.    * Bytes of JPEG data.
  340.    *
  341.    * Format: {@link PelFormat::LONG}.
  342.    *
  343.    * Components: 1.
  344.    */
  345.   const JPEG_INTERCHANGE_FORMAT_LENGTH                    0x0202;
  346.  
  347.   /**
  348.    * Color space transformation matrix coefficients.
  349.    *
  350.    * Format: {@link PelFormat::RATIONAL}.
  351.    *
  352.    * Components: 3.
  353.    */
  354.   const YCBCR_COEFFICIENTS                                0x0211;
  355.  
  356.   /**
  357.    * Subsampling ratio of Y to C.
  358.    *
  359.    * Format: {@link PelFormat::SHORT}.
  360.    *
  361.    * Components: 2.
  362.    */
  363.   const YCBCR_SUB_SAMPLING                                0x0212;
  364.  
  365.   /**
  366.    * Y and C positioning.
  367.    *
  368.    * Format: {@link PelFormat::SHORT}.
  369.    *
  370.    * Components: 1.
  371.    */
  372.   const YCBCR_POSITIONING                                 0x0213;
  373.  
  374.   /**
  375.    * Pair of black and white reference values.
  376.    *
  377.    * Format: {@link PelFormat::RATIONAL}.
  378.    *
  379.    * Components: 6.
  380.    */
  381.   const REFERENCE_BLACK_WHITE                             0x0214;
  382.  
  383.   /**
  384.    * Related Image File Format
  385.    *
  386.    * Format: Unknown.
  387.    *
  388.    * Components: Unknown.
  389.    */
  390.   const RELATED_IMAGE_FILE_FORMAT                         0x1000;
  391.  
  392.   /**
  393.    * Related Image Width
  394.    *
  395.    * Format: Unknown, probably {@link PelFormat::SHORT}?
  396.    *
  397.    * Components: Unknown, probably 1.
  398.    */
  399.   const RELATED_IMAGE_WIDTH                               0x1001;
  400.  
  401.   /** Related Image Length
  402.    *
  403.    * Format: Unknown, probably {@link PelFormat::SHORT}?
  404.    *
  405.    * Components: Unknown, probably 1.
  406.    */
  407.   const RELATED_IMAGE_LENGTH                              0x1002;
  408.  
  409.   /**
  410.    * CFA Repeat Pattern Dim.
  411.    *
  412.    * Format: {@link PelFormat::SHORT}.
  413.    *
  414.    * Components: 2.
  415.    */
  416.   const CFA_REPEAT_PATTERN_DIM                            0x828D;
  417.  
  418.   /**
  419.    * Battery level.
  420.    *
  421.    * Format: Unknown.
  422.    *
  423.    * Components: Unknown.
  424.    */
  425.   const BATTERY_LEVEL                                     0x828F;
  426.  
  427.   /**
  428.    * Copyright holder.
  429.    *
  430.    * Format: {@link PelFormat::ASCII}, modelled by the {@link }
  431.    * PelEntryCopyright} class.
  432.    *
  433.    * Components: any number.
  434.    */
  435.   const COPYRIGHT                                         0x8298;
  436.  
  437.   /**
  438.    * Exposure Time
  439.    *
  440.    * Format: {@link PelFormat::RATIONAL}.
  441.    *
  442.    * Components: 1.
  443.    */
  444.   const EXPOSURE_TIME                                     0x829A;
  445.  
  446.   /**
  447.    * FNumber
  448.    *
  449.    * Format: {@link PelFormat::RATIONAL}.
  450.    *
  451.    * Components: 1.
  452.    */
  453.   const FNUMBER                                           0x829D;
  454.  
  455.   /**
  456.    * IPTC/NAA
  457.    *
  458.    * Format: {@link PelFormat::LONG}.
  459.    *
  460.    * Components: any number.
  461.    */
  462.   const IPTC_NAA                                          0x83BB;
  463.  
  464.   /**
  465.    * Exif IFD Pointer
  466.    *
  467.    * Format: {@link PelFormat::LONG}.
  468.    *
  469.    * Components: 1.
  470.    */
  471.   const EXIF_IFD_POINTER                                  0x8769;
  472.  
  473.   /**
  474.    * Inter Color Profile
  475.    *
  476.    * Format: {@link PelFormat::UNDEFINED}.
  477.    *
  478.    * Components: any number.
  479.    */
  480.   const INTER_COLOR_PROFILE                               0x8773;
  481.  
  482.   /**
  483.    * Exposure Program
  484.    *
  485.    * Format: {@link PelFormat::SHORT}.
  486.    *
  487.    * Components: 1.
  488.    */
  489.   const EXPOSURE_PROGRAM                                  0x8822;
  490.  
  491.   /**
  492.    * Spectral Sensitivity
  493.    *
  494.    * Format: {@link PelFormat::ASCII}.
  495.    *
  496.    * Components: any number.
  497.    */
  498.   const SPECTRAL_SENSITIVITY                              0x8824;
  499.  
  500.   /**
  501.    * GPS Info IFD Pointer
  502.    *
  503.    * Format: {@link PelFormat::LONG}.
  504.    *
  505.    * Components: 1.
  506.    */
  507.   const GPS_INFO_IFD_POINTER                              0x8825;
  508.  
  509.   /**
  510.    * ISO Speed Ratings
  511.    *
  512.    * Format: {@link PelFormat::SHORT}.
  513.    *
  514.    * Components: 2.
  515.    */
  516.   const ISO_SPEED_RATINGS                                 0x8827;
  517.  
  518.   /**
  519.    * OECF
  520.    *
  521.    * Format: {@link PelFormat::UNDEFINED}.
  522.    *
  523.    * Components: any number.
  524.    */
  525.   const OECF                                              0x8828;
  526.  
  527.   /**
  528.    * Exif version.
  529.    *
  530.    * Format: {@link PelFormat::UNDEFINED}, modelled by the {@link }
  531.    * PelEntryVersion} class.
  532.    *
  533.    * Components: 4.
  534.    */
  535.   const EXIF_VERSION                                      0x9000;
  536.  
  537.   /**
  538.    * Date and time of original data generation.
  539.    *
  540.    * Format: {@link PelFormat::ASCII}, modelled by the {@link }
  541.    * PelEntryTime} class.
  542.    *
  543.    * Components: 20.
  544.    */
  545.   const DATE_TIME_ORIGINAL                                0x9003;
  546.  
  547.   /**
  548.    * Date and time of digital data generation.
  549.    *
  550.    * Format: {@link PelFormat::ASCII}, modelled by the {@link }
  551.    * PelEntryTime} class.
  552.    *
  553.    * Components: 20.
  554.    */
  555.   const DATE_TIME_DIGITIZED                               0x9004;
  556.  
  557.   /**
  558.    * Meaning of each component.
  559.    *
  560.    * Format: {@link PelFormat::UNDEFINED}.
  561.    *
  562.    * Components: 4.
  563.    */
  564.   const COMPONENTS_CONFIGURATION                          0x9101;
  565.  
  566.   /**
  567.    * Image compression mode.
  568.    *
  569.    * Format: {@link PelFormat::RATIONAL}.
  570.    *
  571.    * Components: 1.
  572.    */
  573.   const COMPRESSED_BITS_PER_PIXEL                         0x9102;
  574.  
  575.   /**
  576.    * Shutter speed
  577.    *
  578.    * Format: {@link PelFormat::SRATIONAL}.
  579.    *
  580.    * Components: 1.
  581.    */
  582.   const SHUTTER_SPEED_VALUE                               0x9201;
  583.  
  584.   /**
  585.    * Aperture
  586.    *
  587.    * Format: {@link PelFormat::RATIONAL}.
  588.    *
  589.    * Components: 1.
  590.    */
  591.   const APERTURE_VALUE                                    0x9202;
  592.  
  593.   /**
  594.    * Brightness
  595.    *
  596.    * Format: {@link PelFormat::SRATIONAL}.
  597.    *
  598.    * Components: 1.
  599.    */
  600.   const BRIGHTNESS_VALUE                                  0x9203;
  601.  
  602.   /**
  603.    * Exposure Bias
  604.    *
  605.    * Format: {@link PelFormat::SRATIONAL}.
  606.    *
  607.    * Components: 1.
  608.    */
  609.   const EXPOSURE_BIAS_VALUE                               0x9204;
  610.  
  611.   /**
  612.    * Max Aperture Value
  613.    *
  614.    * Format: {@link PelFormat::RATIONAL}.
  615.    *
  616.    * Components: 1.
  617.    */
  618.   const MAX_APERTURE_VALUE                                0x9205;
  619.  
  620.   /**
  621.    * Subject Distance
  622.    *
  623.    * Format: {@link PelFormat::SRATIONAL}.
  624.    *
  625.    * Components: 1.
  626.    */
  627.   const SUBJECT_DISTANCE                                  0x9206;
  628.  
  629.   /**
  630.    * Metering Mode
  631.    *
  632.    * Format: {@link PelFormat::SHORT}.
  633.    *
  634.    * Components: 1.
  635.    */
  636.   const METERING_MODE                                     0x9207;
  637.  
  638.   /**
  639.    * Light Source
  640.    *
  641.    * Format: {@link PelFormat::SHORT}.
  642.    *
  643.    * Components: 1.
  644.    */
  645.   const LIGHT_SOURCE                                      0x9208;
  646.  
  647.   /**
  648.    * Flash
  649.    *
  650.    * Format: {@link PelFormat::SHORT}.
  651.    *
  652.    * Components: 1.
  653.    */
  654.   const FLASH                                             0x9209;
  655.  
  656.   /**
  657.    * Focal Length
  658.    *
  659.    * Format: {@link PelFormat::RATIONAL}.
  660.    *
  661.    * Components: 1.
  662.    */
  663.   const FOCAL_LENGTH                                      0x920A;
  664.  
  665.   /**
  666.    * Subject Area
  667.    *
  668.    * Format: {@link PelFormat::SHORT}.
  669.    *
  670.    * Components: 4.
  671.    */
  672.   const SUBJECT_AREA                                      0x9214;
  673.  
  674.   /**
  675.    * Maker Note
  676.    *
  677.    * Format: {@link PelFormat::UNDEFINED}.
  678.    *
  679.    * Components: any number.
  680.    */
  681.   const MAKER_NOTE                                        0x927C;
  682.  
  683.   /**
  684.    * User Comment
  685.    *
  686.    * Format: {@link PelFormat::UNDEFINED}, modelled by the {@link }
  687.    * PelEntryUserComment} class.
  688.    *
  689.    * Components: any number.
  690.    */
  691.   const USER_COMMENT                                      0x9286;
  692.  
  693.   /**
  694.    * SubSec Time
  695.    *
  696.    * Format: {@link PelFormat::ASCII}.
  697.    *
  698.    * Components: any number.
  699.    */
  700.   const SUB_SEC_TIME                                      0x9290;
  701.  
  702.   /**
  703.    * SubSec Time Original
  704.    *
  705.    * Format: {@link PelFormat::ASCII}.
  706.    *
  707.    * Components: any number.
  708.    */
  709.   const SUB_SEC_TIME_ORIGINAL                             0x9291;
  710.  
  711.   /**
  712.    * SubSec Time Digitized
  713.    *
  714.    * Format: {@link PelFormat::ASCII}.
  715.    *
  716.    * Components: any number.
  717.    */
  718.   const SUB_SEC_TIME_DIGITIZED                            0x9292;
  719.  
  720.   /**
  721.    * Windows XP Title
  722.    *
  723.    * Format: {@link PelFormat::BYTE}, modelled by the
  724.    * {@link PelEntryWindowsString} class.
  725.    *
  726.    * Components: any number.
  727.    */
  728.   const XP_TITLE                                          0x9C9B;
  729.  
  730.  
  731.   /**
  732.    * Windows XP Comment
  733.    *
  734.    * Format: {@link PelFormat::BYTE}, modelled by the
  735.    * {@link PelEntryWindowsString} class.
  736.    *
  737.    * Components: any number.
  738.    */
  739.   const XP_COMMENT                                        0x9C9C;
  740.  
  741.  
  742.   /**
  743.    * Windows XP Author
  744.    *
  745.    * Format: {@link PelFormat::BYTE}, modelled by the
  746.    * {@link PelEntryWindowsString} class.
  747.    *
  748.    * Components: any number.
  749.    */
  750.   const XP_AUTHOR                                         0x9C9D;
  751.  
  752.  
  753.   /**
  754.    * Windows XP Keywords
  755.    *
  756.    * Format: {@link PelFormat::BYTE}, modelled by the
  757.    * {@link PelEntryWindowsString} class.
  758.    *
  759.    * Components: any number.
  760.    */
  761.   const XP_KEYWORDS                                       0x9C9E;
  762.  
  763.  
  764.   /**
  765.    * Windows XP Subject
  766.    *
  767.    * Format: {@link PelFormat::BYTE}, modelled by the
  768.    * {@link PelEntryWindowsString} class.
  769.    *
  770.    * Components: any number.
  771.    */
  772.   const XP_SUBJECT                                        0x9C9F;
  773.  
  774.  
  775.   /**
  776.    * Supported Flashpix version
  777.    *
  778.    * Format: {@link PelFormat::UNDEFINED}, modelled by the {@link }
  779.    * PelEntryVersion} class.
  780.    *
  781.    * Components: 4.
  782.    */
  783.   const FLASH_PIX_VERSION                                 0xA000;
  784.  
  785.   /**
  786.    * Color space information.
  787.    *
  788.    * Format: {@link PelFormat::SHORT}.
  789.    *
  790.    * Components: 1.
  791.    */
  792.   const COLOR_SPACE                                       0xA001;
  793.  
  794.   /**
  795.    * Valid image width.
  796.    *
  797.    * Format: {@link PelFormat::SHORT} or {@link PelFormat::LONG}.
  798.    *
  799.    * Components: 1.
  800.    */
  801.   const PIXEL_X_DIMENSION                                 0xA002;
  802.  
  803.   /**
  804.    * Valid image height.
  805.    *
  806.    * Format: {@link PelFormat::SHORT} or {@link PelFormat::LONG}.
  807.    *
  808.    * Components: 1.
  809.    */
  810.   const PIXEL_Y_DIMENSION                                 0xA003;
  811.  
  812.   /**
  813.    * Related audio file.
  814.    *
  815.    * Format: {@link PelFormat::ASCII}.
  816.    *
  817.    * Components: any number.
  818.    */
  819.   const RELATED_SOUND_FILE                                0xA004;
  820.  
  821.   /**
  822.    * Interoperability IFD Pointer
  823.    *
  824.    * Format: {@link PelFormat::LONG}.
  825.    *
  826.    * Components: 1.
  827.    */
  828.   const INTEROPERABILITY_IFD_POINTER                      0xA005;
  829.  
  830.   /**
  831.    * Flash energy.
  832.    *
  833.    * Format: {@link PelFormat::RATIONAL}.
  834.    *
  835.    * Components: 1.
  836.    */
  837.   const FLASH_ENERGY                                      0xA20B;
  838.  
  839.   /**
  840.    * Spatial frequency response.
  841.    *
  842.    * Format: {@link PelFormat::UNDEFINED}.
  843.    *
  844.    * Components: any number.
  845.    */
  846.   const SPATIAL_FREQUENCY_RESPONSE                        0xA20C;
  847.  
  848.   /**
  849.    * Focal plane X resolution.
  850.    *
  851.    * Format: {@link PelFormat::RATIONAL}.
  852.    *
  853.    * Components: 1.
  854.    */
  855.   const FOCAL_PLANE_X_RESOLUTION                          0xA20E;
  856.  
  857.   /**
  858.    * Focal plane Y resolution.
  859.    *
  860.    * Format: {@link PelFormat::RATIONAL}.
  861.    *
  862.    * Components: 1.
  863.    */
  864.   const FOCAL_PLANE_Y_RESOLUTION                          0xA20F;
  865.  
  866.   /**
  867.    * Focal plane resolution unit.
  868.    *
  869.    * Format: {@link PelFormat::SHORT}.
  870.    *
  871.    * Components: 1.
  872.    */
  873.   const FOCAL_PLANE_RESOLUTION_UNIT                       0xA210;
  874.  
  875.   /**
  876.    * Subject location.
  877.    *
  878.    * Format: {@link PelFormat::SHORT}.
  879.    *
  880.    * Components: 1.
  881.    */
  882.   const SUBJECT_LOCATION                                  0xA214;
  883.  
  884.   /**
  885.    * Exposure index.
  886.    *
  887.    * Format: {@link PelFormat::RATIONAL}.
  888.    *
  889.    * Components: 1.
  890.    */
  891.   const EXPOSURE_INDEX                                    0xA215;
  892.  
  893.   /**
  894.    * Sensing method.
  895.    *
  896.    * Format: {@link PelFormat::SHORT}.
  897.    *
  898.    * Components: 1.
  899.    */
  900.   const SENSING_METHOD                                    0xA217;
  901.  
  902.   /**
  903.    * File source.
  904.    *
  905.    * Format: {@link PelFormat::UNDEFINED}.
  906.    *
  907.    * Components: 1.
  908.    */
  909.   const FILE_SOURCE                                       0xA300;
  910.  
  911.   /**
  912.    * Scene type.
  913.    *
  914.    * Format: {@link PelFormat::UNDEFINED}.
  915.    *
  916.    * Components: 1.
  917.    */
  918.   const SCENE_TYPE                                        0xA301;
  919.  
  920.   /**
  921.    * CFA pattern.
  922.    *
  923.    * Format: {@link PelFormat::UNDEFINED}.
  924.    *
  925.    * Components: any number.
  926.    */
  927.   const CFA_PATTERN                                       0xA302;
  928.  
  929.   /**
  930.    * Custom image processing.
  931.    *
  932.    * Format: {@link PelFormat::SHORT}.
  933.    *
  934.    * Components: 1.
  935.    */
  936.   const CUSTOM_RENDERED                                   0xA401;
  937.  
  938.   /**
  939.    * Exposure mode.
  940.    *
  941.    * Format: {@link PelFormat::SHORT}.
  942.    *
  943.    * Components: 1.
  944.    */
  945.   const EXPOSURE_MODE                                     0xA402;
  946.  
  947.   /**
  948.    * White balance.
  949.    *
  950.    * Format: {@link PelFormat::SHORT}.
  951.    *
  952.    * Components: 1.
  953.    */
  954.   const WHITE_BALANCE                                     0xA403;
  955.  
  956.   /**
  957.    * Digital zoom ratio.
  958.    *
  959.    * Format: {@link PelFormat::RATIONAL}.
  960.    *
  961.    * Components: 1.
  962.    */
  963.   const DIGITAL_ZOOM_RATIO                                0xA404;
  964.  
  965.   /**
  966.    * Focal length in 35mm film.
  967.    *
  968.    * Format: {@link PelFormat::RATIONAL}.
  969.    *
  970.    * Components: 1.
  971.    */
  972.   const FOCAL_LENGTH_IN_35MM_FILM      0xA405;
  973.  
  974.   /**
  975.    * Scene capture type.
  976.    *
  977.    * Format: {@link PelFormat::SHORT}.
  978.    *
  979.    * Components: 1.
  980.    */
  981.   const SCENE_CAPTURE_TYPE                                0xA406;
  982.  
  983.   /**
  984.    * Gain control.
  985.    *
  986.    * Format: {@link PelFormat::SHORT}.
  987.    *
  988.    * Components: 1.
  989.    */
  990.   const GAIN_CONTROL                                      0xA407;
  991.  
  992.   /**
  993.    * Contrast.
  994.    *
  995.    * Format: {@link PelFormat::SHORT}.
  996.    *
  997.    * Components: 1.
  998.    */
  999.   const CONTRAST                                          0xA408;
  1000.  
  1001.   /**
  1002.    * Saturation.
  1003.    *
  1004.    * Format: {@link PelFormat::SHORT}.
  1005.    *
  1006.    * Components: 1.
  1007.    */
  1008.   const SATURATION                                        0xA409;
  1009.  
  1010.   /**
  1011.    * Sharpness.
  1012.    *
  1013.    * Format: {@link PelFormat::SHORT}.
  1014.    *
  1015.    * Components: 1.
  1016.    */
  1017.   const SHARPNESS                                         0xA40A;
  1018.  
  1019.   /**
  1020.    * Device settings description.
  1021.    *
  1022.    * This tag indicates information on the picture-taking conditions
  1023.    * of a particular camera model.  The tag is used only to indicate
  1024.    * the picture-taking conditions in the reader.
  1025.    */
  1026.   const DEVICE_SETTING_DESCRIPTION                        0xA40B;
  1027.  
  1028.   /**
  1029.    * Subject distance range.
  1030.    *
  1031.    * Format: {@link PelFormat::SHORT}.
  1032.    *
  1033.    * Components: 1.
  1034.    */
  1035.   const SUBJECT_DISTANCE_RANGE                            0xA40C;
  1036.  
  1037.   /**
  1038.    * Image unique ID.
  1039.    *
  1040.    * Format: {@link PelFormat::ASCII}.
  1041.    *
  1042.    * Components: 32.
  1043.    */
  1044.   const IMAGE_UNIQUE_ID                                   0xA420;
  1045.  
  1046.   /**
  1047.    * Gamma.
  1048.    *
  1049.    * Format: {@link PelFormat::RATIONAL}.
  1050.    *
  1051.    * Components: 1.
  1052.    */
  1053.   const GAMMA                                             0xA500;
  1054.  
  1055.   /**
  1056.    * PrintIM
  1057.    *
  1058.    * Format: {@link PelFormat::UNDEFINED}.
  1059.    *
  1060.    * Components: unknown.
  1061.    */
  1062.   const PRINT_IM                                          0xC4A5;
  1063.  
  1064.   /**
  1065.    * GPS tag version.
  1066.    *
  1067.    * Format: {@link PelFormat::BYTE}.
  1068.    *
  1069.    * Components: 4.
  1070.    */
  1071.   const GPS_VERSION_ID                                    0x0000;
  1072.  
  1073.   /**
  1074.    * North or South Latitude.
  1075.    *
  1076.    * Format: {@link PelFormat::ASCII}.
  1077.    *
  1078.    * Components: 2.
  1079.    */
  1080.   const GPS_LATITUDE_REF                                  0x0001;
  1081.  
  1082.   /**
  1083.    * Latitude.
  1084.    *
  1085.    * Format: {@link PelFormat::RATIONAL}.
  1086.    *
  1087.    * Components: 3.
  1088.    */
  1089.   const GPS_LATITUDE                                      0x0002;
  1090.  
  1091.   /**
  1092.    * East or West Longitude.
  1093.    *
  1094.    * Format: {@link PelFormat::ASCII}.
  1095.    *
  1096.    * Components: 2.
  1097.    */
  1098.   const GPS_LONGITUDE_REF                                 0x0003;
  1099.  
  1100.   /**
  1101.    * Longitude.
  1102.    *
  1103.    * Format: {@link PelFormat::RATIONAL}.
  1104.    *
  1105.    * Components: 3.
  1106.    */
  1107.   const GPS_LONGITUDE                                     0x0004;
  1108.  
  1109.   /**
  1110.    * Altitude reference.
  1111.    *
  1112.    * Format: {@link PelFormat::BYTE}.
  1113.    *
  1114.    * Components: 1.
  1115.    */
  1116.   const GPS_ALTITUDE_REF                                  0x0005;
  1117.  
  1118.   /**
  1119.    * Altitude.
  1120.    *
  1121.    * Format: {@link PelFormat::RATIONAL}.
  1122.    *
  1123.    * Components: 1.
  1124.    */
  1125.   const GPS_ALTITUDE                                      0x0006;
  1126.  
  1127.   /**
  1128.    * GPS time (atomic clock).
  1129.    *
  1130.    * Format: {@link PelFormat::RATIONAL}.
  1131.    *
  1132.    * Components: 3.
  1133.    */
  1134.   const GPS_TIME_STAMP                                    0x0007;
  1135.  
  1136.   /**
  1137.    * GPS satellites used for measurement.
  1138.    *
  1139.    * Format: {@link PelFormat::ASCII}.
  1140.    *
  1141.    * Components: Any.
  1142.    */
  1143.   const GPS_SATELLITES                                    0x0008;
  1144.  
  1145.   /**
  1146.    * GPS receiver status.
  1147.    *
  1148.    * Format: {@link PelFormat::ASCII}.
  1149.    *
  1150.    * Components: 2.
  1151.    */
  1152.   const GPS_STATUS                                        0x0009;
  1153.  
  1154.   /**
  1155.    * GPS measurement mode.
  1156.    *
  1157.    * Format: {@link PelFormat::ASCII}.
  1158.    *
  1159.    * Components: 2.
  1160.    */
  1161.   const GPS_MEASURE_MODE                                  0x000A;
  1162.  
  1163.   /**
  1164.    * Measurement precision.
  1165.    *
  1166.    * Format: {@link PelFormat::RATIONAL}.
  1167.    *
  1168.    * Components: 1.
  1169.    */
  1170.   const GPS_DOP                                           0x000B;
  1171.  
  1172.   /**
  1173.    * Speed unit.
  1174.    *
  1175.    * Format: {@link PelFormat::ASCII}.
  1176.    *
  1177.    * Components: 2.
  1178.    */
  1179.   const GPS_SPEED_REF                                     0x000C;
  1180.  
  1181.   /**
  1182.    * Speed of GPS receiver.
  1183.    *
  1184.    * Format: {@link PelFormat::RATIONAL}.
  1185.    *
  1186.    * Components: 1.
  1187.    */
  1188.   const GPS_SPEED                                         0x000D;
  1189.  
  1190.   /**
  1191.    * Reference for direction of movement.
  1192.    *
  1193.    * Format: {@link PelFormat::ASCII}.
  1194.    *
  1195.    * Components: 2.
  1196.    */
  1197.   const GPS_TRACK_REF                                     0x000E;
  1198.  
  1199.   /**
  1200.    * Direction of movement.
  1201.    *
  1202.    * Format: {@link PelFormat::RATIONAL}.
  1203.    *
  1204.    * Components: 1.
  1205.    */
  1206.   const GPS_TRACK                                         0x000F;
  1207.  
  1208.   /**
  1209.    * Reference for direction of image.
  1210.    *
  1211.    * Format: {@link PelFormat::ASCII}.
  1212.    *
  1213.    * Components: 2.
  1214.    */
  1215.   const GPS_IMG_DIRECTION_REF                             0x0010;
  1216.  
  1217.   /**
  1218.    * Direction of image.
  1219.    *
  1220.    * Format: {@link PelFormat::RATIONAL}.
  1221.    *
  1222.    * Components: 1.
  1223.    */
  1224.   const GPS_IMG_DIRECTION                                 0x0011;
  1225.  
  1226.   /**
  1227.    * Geodetic survey data used.
  1228.    *
  1229.    * Format: {@link PelFormat::ASCII}.
  1230.    *
  1231.    * Components: Any.
  1232.    */
  1233.   const GPS_MAP_DATUM                                     0x0012;
  1234.  
  1235.   /**
  1236.    * Reference for latitude of destination.
  1237.    *
  1238.    * Format: {@link PelFormat::ASCII}.
  1239.    *
  1240.    * Components: 2.
  1241.    */
  1242.   const GPS_DEST_LATITUDE_REF                             0x0013;
  1243.  
  1244.   /**
  1245.    * Latitude of destination.
  1246.    *
  1247.    * Format: {@link PelFormat::RATIONAL}.
  1248.    *
  1249.    * Components: 3.
  1250.    */
  1251.   const GPS_DEST_LATITUDE                                 0x0014;
  1252.  
  1253.   /**
  1254.    * Reference for longitude of destination.
  1255.    *
  1256.    * Format: {@link PelFormat::ASCII}.
  1257.    *
  1258.    * Components: 2.
  1259.    */
  1260.   const GPS_DEST_LONGITUDE_REF                            0x0015;
  1261.  
  1262.   /**
  1263.    * Longitude of destination.
  1264.    *
  1265.    * Format: {@link PelFormat::RATIONAL}.
  1266.    *
  1267.    * Components: 3.
  1268.    */
  1269.   const GPS_DEST_LONGITUDE                                0x0016;
  1270.  
  1271.   /**
  1272.    * Reference for bearing of destination.
  1273.    *
  1274.    * Format: {@link PelFormat::ASCII}.
  1275.    *
  1276.    * Components: 2.
  1277.    */
  1278.   const GPS_DEST_BEARING_REF                              0x0017;
  1279.  
  1280.   /**
  1281.    * Bearing of destination.
  1282.    *
  1283.    * Format: {@link PelFormat::RATIONAL}.
  1284.    *
  1285.    * Components: 1.
  1286.    */
  1287.   const GPS_DEST_BEARING                                  0x0018;
  1288.  
  1289.   /**
  1290.    * Reference for distance to destination.
  1291.    *
  1292.    * Format: {@link PelFormat::ASCII}.
  1293.    *
  1294.    * Components: 2.
  1295.    */
  1296.   const GPS_DEST_DISTANCE_REF                             0x0019;
  1297.  
  1298.   /**
  1299.    * Distance to destination.
  1300.    *
  1301.    * Format: {@link PelFormat::RATIONAL}.
  1302.    *
  1303.    * Components: 1.
  1304.    */
  1305.   const GPS_DEST_DISTANCE                                 0x001A;
  1306.  
  1307.   /**
  1308.    * Name of GPS processing method.
  1309.    *
  1310.    * Format: {@link PelFormat::UNDEFINED}.
  1311.    *
  1312.    * Components: Any.
  1313.    */
  1314.   const GPS_PROCESSING_METHOD                             0x001B;
  1315.  
  1316.   /**
  1317.    * Name of GPS area.
  1318.    *
  1319.    * Format: {@link PelFormat::UNDEFINED}.
  1320.    *
  1321.    * Components: Any.
  1322.    */
  1323.   const GPS_AREA_INFORMATION                              0x001C;
  1324.  
  1325.   /**
  1326.    * GPS date.
  1327.    *
  1328.    * Format: {@link PelFormat::ASCII}.
  1329.    *
  1330.    * Components: 11.
  1331.    */
  1332.   const GPS_DATE_STAMP                                    0x001D;
  1333.  
  1334.   /**
  1335.    * GPS differential correction.
  1336.    *
  1337.    * Format: {@link PelFormat::SHORT}.
  1338.    *
  1339.    * Components: 1.
  1340.    */
  1341.   const GPS_DIFFERENTIAL                                  0x001E;
  1342.  
  1343.  
  1344.   /**
  1345.    * Returns a short name for an Exif tag.
  1346.    *
  1347.    * @param int the IFD type of the tag, one of {@link PelIfd::IFD0},
  1348.    *  {@link PelIfd::IFD1}{@link PelIfd::EXIF}{@link PelIfd::GPS},
  1349.    *  or {@link PelIfd::INTEROPERABILITY}.
  1350.    *
  1351.    * @param PelTag the tag.
  1352.    *
  1353.    * @return string the short name of the tag, e.g., 'ImageWidth' for
  1354.    *  the {@link IMAGE_WIDTH} tag.  If the tag is not known, the string
  1355.    *  'Unknown:0xTTTT' will be returned where 'TTTT' is the hexadecimal
  1356.    *  representation of the tag.
  1357.    */
  1358.   static function getName($type$tag{
  1359.  
  1360.     switch ($type{
  1361.     case PelIfd::IFD0:
  1362.     case PelIfd::IFD1:
  1363.     case PelIfd::EXIF:
  1364.     case PelIfd::INTEROPERABILITY:
  1365.  
  1366.       switch ($tag{
  1367.       case self::INTEROPERABILITY_INDEX:
  1368.         return 'InteroperabilityIndex';
  1369.       case self::INTEROPERABILITY_VERSION:
  1370.         return 'InteroperabilityVersion';
  1371.       case self::IMAGE_WIDTH:
  1372.         return 'ImageWidth';
  1373.       case self::IMAGE_LENGTH:
  1374.         return 'ImageLength';
  1375.       case self::BITS_PER_SAMPLE:
  1376.         return 'BitsPerSample';
  1377.       case self::COMPRESSION:
  1378.         return 'Compression';
  1379.       case self::PHOTOMETRIC_INTERPRETATION:
  1380.         return 'PhotometricInterpretation';
  1381.       case self::FILL_ORDER:
  1382.         return 'FillOrder';
  1383.       case self::DOCUMENT_NAME:
  1384.         return 'DocumentName';
  1385.       case self::IMAGE_DESCRIPTION:
  1386.         return 'ImageDescription';
  1387.       case self::MAKE:
  1388.         return 'Make';
  1389.       case self::MODEL:
  1390.         return 'Model';
  1391.       case self::STRIP_OFFSETS:
  1392.         return 'StripOffsets';
  1393.       case self::ORIENTATION:
  1394.         return 'Orientation';
  1395.       case self::SAMPLES_PER_PIXEL:
  1396.         return 'SamplesPerPixel';
  1397.       case self::ROWS_PER_STRIP:
  1398.         return 'RowsPerStrip';
  1399.       case self::STRIP_BYTE_COUNTS:
  1400.         return 'StripByteCounts';
  1401.       case self::X_RESOLUTION:
  1402.         return 'XResolution';
  1403.       case self::Y_RESOLUTION:
  1404.         return 'YResolution';
  1405.       case self::PLANAR_CONFIGURATION:
  1406.         return 'PlanarConfiguration';
  1407.       case self::RESOLUTION_UNIT:
  1408.         return 'ResolutionUnit';
  1409.       case self::TRANSFER_FUNCTION:
  1410.         return 'TransferFunction';
  1411.       case self::SOFTWARE:
  1412.         return 'Software';
  1413.       case self::DATE_TIME:
  1414.         return 'DateTime';
  1415.       case self::ARTIST:
  1416.         return 'Artist';
  1417.       case self::WHITE_POINT:
  1418.         return 'WhitePoint';
  1419.       case self::PRIMARY_CHROMATICITIES:
  1420.         return 'PrimaryChromaticities';
  1421.       case self::TRANSFER_RANGE:
  1422.         return 'TransferRange';
  1423.       case self::JPEG_PROC:
  1424.         return 'JPEGProc';
  1425.       case self::JPEG_INTERCHANGE_FORMAT:
  1426.         return 'JPEGInterchangeFormat';
  1427.       case self::JPEG_INTERCHANGE_FORMAT_LENGTH:
  1428.         return 'JPEGInterchangeFormatLength';
  1429.       case self::YCBCR_COEFFICIENTS:
  1430.         return 'YCbCrCoefficients';
  1431.       case self::YCBCR_SUB_SAMPLING:
  1432.         return 'YCbCrSubSampling';
  1433.       case self::YCBCR_POSITIONING:
  1434.         return 'YCbCrPositioning';
  1435.       case self::REFERENCE_BLACK_WHITE:
  1436.         return 'ReferenceBlackWhite';
  1437.       case self::RELATED_IMAGE_FILE_FORMAT:
  1438.         return 'RelatedImageFileFormat';
  1439.       case self::RELATED_IMAGE_WIDTH:
  1440.         return 'RelatedImageWidth';
  1441.       case self::RELATED_IMAGE_LENGTH:
  1442.         return 'RelatedImageLength';
  1443.       case self::CFA_REPEAT_PATTERN_DIM:
  1444.         return 'CFARepeatPatternDim';
  1445.       case self::CFA_PATTERN:
  1446.         return 'CFAPattern';
  1447.       case self::BATTERY_LEVEL:
  1448.         return 'BatteryLevel';
  1449.       case self::COPYRIGHT:
  1450.         return 'Copyright';
  1451.       case self::EXPOSURE_TIME:
  1452.         return 'ExposureTime';
  1453.       case self::FNUMBER:
  1454.         return 'FNumber';
  1455.       case self::IPTC_NAA:
  1456.         return 'IPTC/NAA';
  1457.       case self::EXIF_IFD_POINTER:
  1458.         return 'ExifIFDPointer';
  1459.       case self::INTER_COLOR_PROFILE:
  1460.         return 'InterColorProfile';
  1461.       case self::EXPOSURE_PROGRAM:
  1462.         return 'ExposureProgram';
  1463.       case self::SPECTRAL_SENSITIVITY:
  1464.         return 'SpectralSensitivity';
  1465.       case self::GPS_INFO_IFD_POINTER:
  1466.         return 'GPSInfoIFDPointer';
  1467.       case self::ISO_SPEED_RATINGS:
  1468.         return 'ISOSpeedRatings';
  1469.       case self::OECF:
  1470.         return 'OECF';
  1471.       case self::EXIF_VERSION:
  1472.         return 'ExifVersion';
  1473.       case self::DATE_TIME_ORIGINAL:
  1474.         return 'DateTimeOriginal';
  1475.       case self::DATE_TIME_DIGITIZED:
  1476.         return 'DateTimeDigitized';
  1477.       case self::COMPONENTS_CONFIGURATION:
  1478.         return 'ComponentsConfiguration';
  1479.       case self::COMPRESSED_BITS_PER_PIXEL:
  1480.         return 'CompressedBitsPerPixel';
  1481.       case self::SHUTTER_SPEED_VALUE:
  1482.         return 'ShutterSpeedValue';
  1483.       case self::APERTURE_VALUE:
  1484.         return 'ApertureValue';
  1485.       case self::BRIGHTNESS_VALUE:
  1486.         return 'BrightnessValue';
  1487.       case self::EXPOSURE_BIAS_VALUE:
  1488.         return 'ExposureBiasValue';
  1489.       case self::MAX_APERTURE_VALUE:
  1490.         return 'MaxApertureValue';
  1491.       case self::SUBJECT_DISTANCE:
  1492.         return 'SubjectDistance';
  1493.       case self::METERING_MODE:
  1494.         return 'MeteringMode';
  1495.       case self::LIGHT_SOURCE:
  1496.         return 'LightSource';
  1497.       case self::FLASH:
  1498.         return 'Flash';
  1499.       case self::FOCAL_LENGTH:
  1500.         return 'FocalLength';
  1501.       case self::MAKER_NOTE:
  1502.         return 'MakerNote';
  1503.       case self::USER_COMMENT:
  1504.         return 'UserComment';
  1505.       case self::SUB_SEC_TIME:
  1506.         return 'SubSecTime';
  1507.       case self::SUB_SEC_TIME_ORIGINAL:
  1508.         return 'SubSecTimeOriginal';
  1509.       case self::SUB_SEC_TIME_DIGITIZED:
  1510.         return 'SubSecTimeDigitized';
  1511.       case self::XP_TITLE:
  1512.         return 'WindowsXPTitle';
  1513.       case self::XP_COMMENT:
  1514.         return 'WindowsXPComment';
  1515.       case self::XP_AUTHOR:
  1516.         return 'WindowsXPAuthor';
  1517.       case self::XP_KEYWORDS:
  1518.         return 'WindowsXPKeywords';
  1519.       case self::XP_SUBJECT:
  1520.         return 'WindowsXPSubject';
  1521.       case self::FLASH_PIX_VERSION:
  1522.         return 'FlashPixVersion';
  1523.       case self::COLOR_SPACE:
  1524.         return 'ColorSpace';
  1525.       case self::PIXEL_X_DIMENSION:
  1526.         return 'PixelXDimension';
  1527.       case self::PIXEL_Y_DIMENSION:
  1528.         return 'PixelYDimension';
  1529.       case self::RELATED_SOUND_FILE:
  1530.         return 'RelatedSoundFile';
  1531.       case self::INTEROPERABILITY_IFD_POINTER:
  1532.         return 'InteroperabilityIFDPointer';
  1533.       case self::FLASH_ENERGY:
  1534.         return 'FlashEnergy';
  1535.       case self::SPATIAL_FREQUENCY_RESPONSE:
  1536.         return 'SpatialFrequencyResponse';
  1537.       case self::FOCAL_PLANE_X_RESOLUTION:
  1538.         return 'FocalPlaneXResolution';
  1539.       case self::FOCAL_PLANE_Y_RESOLUTION:
  1540.         return 'FocalPlaneYResolution';
  1541.       case self::FOCAL_PLANE_RESOLUTION_UNIT:
  1542.         return 'FocalPlaneResolutionUnit';
  1543.       case self::SUBJECT_LOCATION:
  1544.         return 'SubjectLocation';
  1545.       case self::EXPOSURE_INDEX:
  1546.         return 'ExposureIndex';
  1547.       case self::SENSING_METHOD:
  1548.         return 'SensingMethod';
  1549.       case self::FILE_SOURCE:
  1550.         return 'FileSource';
  1551.       case self::SCENE_TYPE:
  1552.         return 'SceneType';
  1553.       case self::SUBJECT_AREA:
  1554.         return 'SubjectArea';
  1555.       case self::CUSTOM_RENDERED:
  1556.         return 'CustomRendered';
  1557.       case self::EXPOSURE_MODE:
  1558.         return 'ExposureMode';
  1559.       case self::WHITE_BALANCE:
  1560.         return 'WhiteBalance';
  1561.       case self::DIGITAL_ZOOM_RATIO:
  1562.         return 'DigitalZoomRatio';
  1563.       case self::FOCAL_LENGTH_IN_35MM_FILM:
  1564.         return 'FocalLengthIn35mmFilm';
  1565.       case self::SCENE_CAPTURE_TYPE:
  1566.         return 'SceneCaptureType';
  1567.       case self::GAIN_CONTROL:
  1568.         return 'GainControl';
  1569.       case self::CONTRAST:
  1570.         return 'Contrast';
  1571.       case self::SATURATION:
  1572.         return 'Saturation';
  1573.       case self::SHARPNESS:
  1574.         return 'Sharpness';
  1575.       case self::DEVICE_SETTING_DESCRIPTION:
  1576.         return 'DeviceSettingDescription';
  1577.       case self::SUBJECT_DISTANCE_RANGE:
  1578.         return 'SubjectDistanceRange';
  1579.       case self::IMAGE_UNIQUE_ID:
  1580.         return 'ImageUniqueID';
  1581.       case self::GAMMA:
  1582.         return 'Gamma';
  1583.       case self::PRINT_IM:
  1584.         return 'PrintIM';
  1585.       }
  1586.  
  1587.     case PelIfd::GPS:
  1588.       switch ($tag{
  1589.       case self::GPS_VERSION_ID:
  1590.         return 'GPSVersionID';
  1591.       case self::GPS_LATITUDE_REF:
  1592.         return 'GPSLatitudeRef';
  1593.       case self::GPS_LATITUDE:
  1594.         return 'GPSLatitude';
  1595.       case self::GPS_LONGITUDE_REF:
  1596.         return 'GPSLongitudeRef';
  1597.       case self::GPS_LONGITUDE:
  1598.         return 'GPSLongitude';
  1599.       case self::GPS_ALTITUDE_REF:
  1600.         return 'GPSAltitudeRef';
  1601.       case self::GPS_ALTITUDE:
  1602.         return 'GPSAltitude';
  1603.       case self::GPS_TIME_STAMP:
  1604.         return 'GPSTimeStamp';
  1605.       case self::GPS_SATELLITES:
  1606.         return 'GPSSatellites';
  1607.       case self::GPS_STATUS:
  1608.         return 'GPSStatus';
  1609.       case self::GPS_MEASURE_MODE:
  1610.         return 'GPSMeasureMode';
  1611.       case self::GPS_DOP:
  1612.         return 'GPSDOP';
  1613.       case self::GPS_SPEED_REF:
  1614.         return 'GPSSpeedRef';
  1615.       case self::GPS_SPEED:
  1616.         return 'GPSSpeed';
  1617.       case self::GPS_TRACK_REF:
  1618.         return 'GPSTrackRef';
  1619.       case self::GPS_TRACK:
  1620.         return 'GPSTrack';
  1621.       case self::GPS_IMG_DIRECTION_REF:
  1622.         return 'GPSImgDirectionRef';
  1623.       case self::GPS_IMG_DIRECTION:
  1624.         return 'GPSImgDirection';
  1625.       case self::GPS_MAP_DATUM:
  1626.         return 'GPSMapDatum';
  1627.       case self::GPS_DEST_LATITUDE_REF:
  1628.         return 'GPSDestLatitudeRef';
  1629.       case self::GPS_DEST_LATITUDE:
  1630.         return 'GPSDestLatitude';
  1631.       case self::GPS_DEST_LONGITUDE_REF:
  1632.         return 'GPSDestLongitudeRef';
  1633.       case self::GPS_DEST_LONGITUDE:
  1634.         return 'GPSDestLongitude';
  1635.       case self::GPS_DEST_BEARING_REF:
  1636.         return 'GPSDestBearingRef';
  1637.       case self::GPS_DEST_BEARING:
  1638.         return 'GPSDestBearing';
  1639.       case self::GPS_DEST_DISTANCE_REF:
  1640.         return 'GPSDestDistanceRef';
  1641.       case self::GPS_DEST_DISTANCE:
  1642.         return 'GPSDestDistance';
  1643.       case self::GPS_PROCESSING_METHOD:
  1644.         return 'GPSProcessingMethod';
  1645.       case self::GPS_AREA_INFORMATION:
  1646.         return 'GPSAreaInformation';
  1647.       case self::GPS_DATE_STAMP:
  1648.         return 'GPSDateStamp';
  1649.       case self::GPS_DIFFERENTIAL:
  1650.         return 'GPSDifferential';
  1651.       }
  1652.  
  1653.     default:
  1654.       return Pel::fmt('Unknown: 0x%04X'$tag);
  1655.     }
  1656.   }
  1657.  
  1658.  
  1659.   /**
  1660.    * Returns a title for an Exif tag.
  1661.    *
  1662.    * @param int the IFD type of the tag, one of {@link PelIfd::IFD0},
  1663.    *  {@link PelIfd::IFD1}{@link PelIfd::EXIF}{@link PelIfd::GPS},
  1664.    *  or {@link PelIfd::INTEROPERABILITY}.
  1665.    *
  1666.    * @param PelTag the tag.
  1667.    *
  1668.    * @return string the title of the tag, e.g., 'Image Width' for the
  1669.    *  {@link IMAGE_WIDTH} tag.  If the tag isn't known, the string
  1670.    *  'Unknown Tag: 0xTT' will be returned where 'TT' is the
  1671.    *  hexadecimal representation of the tag.
  1672.    */
  1673.   function getTitle($type$tag{
  1674.  
  1675.     switch ($type{
  1676.     case PelIfd::IFD0:
  1677.     case PelIfd::IFD1:
  1678.     case PelIfd::EXIF:
  1679.     case PelIfd::INTEROPERABILITY:
  1680.  
  1681.       switch ($tag{
  1682.       case self::INTEROPERABILITY_INDEX:
  1683.         return Pel::tra('Interoperability Index');
  1684.       case self::INTEROPERABILITY_VERSION:
  1685.         return Pel::tra('Interoperability Version');
  1686.       case self::IMAGE_WIDTH:
  1687.         return Pel::tra('Image Width');
  1688.       case self::IMAGE_LENGTH:
  1689.         return Pel::tra('Image Length');
  1690.       case self::BITS_PER_SAMPLE:
  1691.         return Pel::tra('Bits per Sample');
  1692.       case self::COMPRESSION:
  1693.         return Pel::tra('Compression');
  1694.       case self::PHOTOMETRIC_INTERPRETATION:
  1695.         return Pel::tra('Photometric Interpretation');
  1696.       case self::FILL_ORDER:
  1697.         return Pel::tra('Fill Order');
  1698.       case self::DOCUMENT_NAME:
  1699.         return Pel::tra('Document Name');
  1700.       case self::IMAGE_DESCRIPTION:
  1701.         return Pel::tra('Image Description');
  1702.       case self::MAKE:
  1703.         return Pel::tra('Manufacturer');
  1704.       case self::MODEL:
  1705.         return Pel::tra('Model');
  1706.       case self::STRIP_OFFSETS:
  1707.         return Pel::tra('Strip Offsets');
  1708.       case self::ORIENTATION:
  1709.         return Pel::tra('Orientation');
  1710.       case self::SAMPLES_PER_PIXEL:
  1711.         return Pel::tra('Samples per Pixel');
  1712.       case self::ROWS_PER_STRIP:
  1713.         return Pel::tra('Rows per Strip');
  1714.       case self::STRIP_BYTE_COUNTS:
  1715.         return Pel::tra('Strip Byte Count');
  1716.       case self::X_RESOLUTION:
  1717.         return Pel::tra('x-Resolution');
  1718.       case self::Y_RESOLUTION:
  1719.         return Pel::tra('y-Resolution');
  1720.       case self::PLANAR_CONFIGURATION:
  1721.         return Pel::tra('Planar Configuration');
  1722.       case self::RESOLUTION_UNIT:
  1723.         return Pel::tra('Resolution Unit');
  1724.       case self::TRANSFER_FUNCTION:
  1725.         return Pel::tra('Transfer Function');
  1726.       case self::SOFTWARE:
  1727.         return Pel::tra('Software');
  1728.       case self::DATE_TIME:
  1729.         return Pel::tra('Date and Time');
  1730.       case self::ARTIST:
  1731.         return Pel::tra('Artist');
  1732.       case self::WHITE_POINT:
  1733.         return Pel::tra('White Point');
  1734.       case self::PRIMARY_CHROMATICITIES:
  1735.         return Pel::tra('Primary Chromaticities');
  1736.       case self::TRANSFER_RANGE:
  1737.         return Pel::tra('Transfer Range');
  1738.       case self::JPEG_PROC:
  1739.         return Pel::tra('JPEG Process');
  1740.       case self::JPEG_INTERCHANGE_FORMAT:
  1741.         return Pel::tra('JPEG Interchange Format');
  1742.       case self::JPEG_INTERCHANGE_FORMAT_LENGTH:
  1743.         return Pel::tra('JPEG Interchange Format Length');
  1744.       case self::YCBCR_COEFFICIENTS:
  1745.         return Pel::tra('YCbCr Coefficients');
  1746.       case self::YCBCR_SUB_SAMPLING:
  1747.         return Pel::tra('YCbCr Sub-Sampling');
  1748.       case self::YCBCR_POSITIONING:
  1749.         return Pel::tra('YCbCr Positioning');
  1750.       case self::REFERENCE_BLACK_WHITE:
  1751.         return Pel::tra('Reference Black/White');
  1752.       case self::RELATED_IMAGE_FILE_FORMAT:
  1753.         return Pel::tra('Related Image File Format');
  1754.       case self::RELATED_IMAGE_WIDTH:
  1755.         return Pel::tra('Related Image Width');
  1756.       case self::RELATED_IMAGE_LENGTH:
  1757.         return Pel::tra('Related Image Length');
  1758.       case self::CFA_REPEAT_PATTERN_DIM:
  1759.         return Pel::tra('CFA Repeat Pattern Dim');
  1760.       case self::CFA_PATTERN:
  1761.         return Pel::tra('CFA Pattern');
  1762.       case self::BATTERY_LEVEL:
  1763.         return Pel::tra('Battery Level');
  1764.       case self::COPYRIGHT:
  1765.         return Pel::tra('Copyright');
  1766.       case self::EXPOSURE_TIME:
  1767.         return Pel::tra('Exposure Time');
  1768.       case self::FNUMBER:
  1769.         return Pel::tra('FNumber');
  1770.       case self::IPTC_NAA:
  1771.         return Pel::tra('IPTC/NAA');
  1772.       case self::EXIF_IFD_POINTER:
  1773.         return Pel::tra('Exif IFD Pointer');
  1774.       case self::INTER_COLOR_PROFILE:
  1775.         return Pel::tra('Inter Color Profile');
  1776.       case self::EXPOSURE_PROGRAM:
  1777.         return Pel::tra('Exposure Program');
  1778.       case self::SPECTRAL_SENSITIVITY:
  1779.         return Pel::tra('Spectral Sensitivity');
  1780.       case self::GPS_INFO_IFD_POINTER:
  1781.         return Pel::tra('GPS Info IFD Pointer');
  1782.       case self::ISO_SPEED_RATINGS:
  1783.         return Pel::tra('ISO Speed Ratings');
  1784.       case self::OECF:
  1785.         return Pel::tra('OECF');
  1786.       case self::EXIF_VERSION:
  1787.         return Pel::tra('Exif Version');
  1788.       case self::DATE_TIME_ORIGINAL:
  1789.         return Pel::tra('Date and Time (original)');
  1790.       case self::DATE_TIME_DIGITIZED:
  1791.         return Pel::tra('Date and Time (digitized)');
  1792.       case self::COMPONENTS_CONFIGURATION:
  1793.         return Pel::tra('Components Configuration');
  1794.       case self::COMPRESSED_BITS_PER_PIXEL:
  1795.         return Pel::tra('Compressed Bits per Pixel');
  1796.       case self::SHUTTER_SPEED_VALUE:
  1797.         return Pel::tra('Shutter speed');
  1798.       case self::APERTURE_VALUE:
  1799.         return Pel::tra('Aperture');
  1800.       case self::BRIGHTNESS_VALUE:
  1801.         return Pel::tra('Brightness');
  1802.       case self::EXPOSURE_BIAS_VALUE:
  1803.         return Pel::tra('Exposure Bias');
  1804.       case self::MAX_APERTURE_VALUE:
  1805.         return Pel::tra('Max Aperture Value');
  1806.       case self::SUBJECT_DISTANCE:
  1807.         return Pel::tra('Subject Distance');
  1808.       case self::METERING_MODE:
  1809.         return Pel::tra('Metering Mode');
  1810.       case self::LIGHT_SOURCE:
  1811.         return Pel::tra('Light Source');
  1812.       case self::FLASH:
  1813.         return Pel::tra('Flash');
  1814.       case self::FOCAL_LENGTH:
  1815.         return Pel::tra('Focal Length');
  1816.       case self::MAKER_NOTE:
  1817.         return Pel::tra('Maker Note');
  1818.       case self::USER_COMMENT:
  1819.         return Pel::tra('User Comment');
  1820.       case self::SUB_SEC_TIME:
  1821.         return Pel::tra('SubSec Time');
  1822.       case self::SUB_SEC_TIME_ORIGINAL:
  1823.         return Pel::tra('SubSec Time Original');
  1824.       case self::SUB_SEC_TIME_DIGITIZED:
  1825.         return Pel::tra('SubSec Time Digitized');
  1826.       case self::XP_TITLE:
  1827.         return 'Windows XP Title';
  1828.       case self::XP_COMMENT:
  1829.         return 'Windows XP Comment';
  1830.       case self::XP_AUTHOR:
  1831.         return 'Windows XP Author';
  1832.       case self::XP_KEYWORDS:
  1833.         return 'Windows XP Keywords';
  1834.       case self::XP_SUBJECT:
  1835.         return 'Windows XP Subject';
  1836.       case self::FLASH_PIX_VERSION:
  1837.         return Pel::tra('FlashPix Version');
  1838.       case self::COLOR_SPACE:
  1839.         return Pel::tra('Color Space');
  1840.       case self::PIXEL_X_DIMENSION:
  1841.         return Pel::tra('Pixel x-Dimension');
  1842.       case self::PIXEL_Y_DIMENSION:
  1843.         return Pel::tra('Pixel y-Dimension');
  1844.       case self::RELATED_SOUND_FILE:
  1845.         return Pel::tra('Related Sound File');
  1846.       case self::INTEROPERABILITY_IFD_POINTER:
  1847.         return Pel::tra('Interoperability IFD Pointer');
  1848.       case self::FLASH_ENERGY:
  1849.         return Pel::tra('Flash Energy');
  1850.       case self::SPATIAL_FREQUENCY_RESPONSE:
  1851.         return Pel::tra('Spatial Frequency Response');
  1852.       case self::FOCAL_PLANE_X_RESOLUTION:
  1853.         return Pel::tra('Focal Plane x-Resolution');
  1854.       case self::FOCAL_PLANE_Y_RESOLUTION:
  1855.         return Pel::tra('Focal Plane y-Resolution');
  1856.       case self::FOCAL_PLANE_RESOLUTION_UNIT:
  1857.         return Pel::tra('Focal Plane Resolution Unit');
  1858.       case self::SUBJECT_LOCATION:
  1859.         return Pel::tra('Subject Location');
  1860.       case self::EXPOSURE_INDEX:
  1861.         return Pel::tra('Exposure index');
  1862.       case self::SENSING_METHOD:
  1863.         return Pel::tra('Sensing Method');
  1864.       case self::FILE_SOURCE:
  1865.         return Pel::tra('File Source');
  1866.       case self::SCENE_TYPE:
  1867.         return Pel::tra('Scene Type');
  1868.       case self::SUBJECT_AREA:
  1869.         return Pel::tra('Subject Area');
  1870.       case self::CUSTOM_RENDERED:
  1871.         return Pel::tra('Custom Rendered');
  1872.       case self::EXPOSURE_MODE:
  1873.         return Pel::tra('Exposure Mode');
  1874.       case self::WHITE_BALANCE:
  1875.         return Pel::tra('White Balance');
  1876.       case self::DIGITAL_ZOOM_RATIO:
  1877.         return Pel::tra('Digital Zoom Ratio');
  1878.       case self::FOCAL_LENGTH_IN_35MM_FILM:
  1879.         return Pel::tra('Focal Length In 35mm Film');
  1880.       case self::SCENE_CAPTURE_TYPE:
  1881.         return Pel::tra('Scene Capture Type');
  1882.       case self::GAIN_CONTROL:
  1883.         return Pel::tra('Gain Control');
  1884.       case self::CONTRAST:
  1885.         return Pel::tra('Contrast');
  1886.       case self::SATURATION:
  1887.         return Pel::tra('Saturation');
  1888.       case self::SHARPNESS:
  1889.         return Pel::tra('Sharpness');
  1890.       case self::DEVICE_SETTING_DESCRIPTION:
  1891.         return Pel::tra('Device Setting Description');
  1892.       case self::SUBJECT_DISTANCE_RANGE:
  1893.         return Pel::tra('Subject Distance Range');
  1894.       case self::IMAGE_UNIQUE_ID:
  1895.         return Pel::tra('Image Unique ID');
  1896.       case self::GAMMA:
  1897.         return Pel::tra('Gamma');
  1898.       case self::PRINT_IM:
  1899.         return Pel::tra('Print IM');
  1900.       }
  1901.  
  1902.     case PelIfd::GPS:
  1903.       switch ($tag{
  1904.       case self::GPS_VERSION_ID:
  1905.         return 'GPSVersionID';
  1906.       case self::GPS_LATITUDE_REF:
  1907.         return 'GPSLatitudeRef';
  1908.       case self::GPS_LATITUDE:
  1909.         return 'GPSLatitude';
  1910.       case self::GPS_LONGITUDE_REF:
  1911.         return 'GPSLongitudeRef';
  1912.       case self::GPS_LONGITUDE:
  1913.         return 'GPSLongitude';
  1914.       case self::GPS_ALTITUDE_REF:
  1915.         return 'GPSAltitudeRef';
  1916.       case self::GPS_ALTITUDE:
  1917.         return 'GPSAltitude';
  1918.       case self::GPS_TIME_STAMP:
  1919.         return 'GPSTimeStamp';
  1920.       case self::GPS_SATELLITES:
  1921.         return 'GPSSatellites';
  1922.       case self::GPS_STATUS:
  1923.         return 'GPSStatus';
  1924.       case self::GPS_MEASURE_MODE:
  1925.         return 'GPSMeasureMode';
  1926.       case self::GPS_DOP:
  1927.         return 'GPSDOP';
  1928.       case self::GPS_SPEED_REF:
  1929.         return 'GPSSpeedRef';
  1930.       case self::GPS_SPEED:
  1931.         return 'GPSSpeed';
  1932.       case self::GPS_TRACK_REF:
  1933.         return 'GPSTrackRef';
  1934.       case self::GPS_TRACK:
  1935.         return 'GPSTrack';
  1936.       case self::GPS_IMG_DIRECTION_REF:
  1937.         return 'GPSImgDirectionRef';
  1938.       case self::GPS_IMG_DIRECTION:
  1939.         return 'GPSImgDirection';
  1940.       case self::GPS_MAP_DATUM:
  1941.         return 'GPSMapDatum';
  1942.       case self::GPS_DEST_LATITUDE_REF:
  1943.         return 'GPSDestLatitudeRef';
  1944.       case self::GPS_DEST_LATITUDE:
  1945.         return 'GPSDestLatitude';
  1946.       case self::GPS_DEST_LONGITUDE_REF:
  1947.         return 'GPSDestLongitudeRef';
  1948.       case self::GPS_DEST_LONGITUDE:
  1949.         return 'GPSDestLongitude';
  1950.       case self::GPS_DEST_BEARING_REF:
  1951.         return 'GPSDestBearingRef';
  1952.       case self::GPS_DEST_BEARING:
  1953.         return 'GPSDestBearing';
  1954.       case self::GPS_DEST_DISTANCE_REF:
  1955.         return 'GPSDestDistanceRef';
  1956.       case self::GPS_DEST_DISTANCE:
  1957.         return 'GPSDestDistance';
  1958.       case self::GPS_PROCESSING_METHOD:
  1959.         return 'GPSProcessingMethod';
  1960.       case self::GPS_AREA_INFORMATION:
  1961.         return 'GPSAreaInformation';
  1962.       case self::GPS_DATE_STAMP:
  1963.         return 'GPSDateStamp';
  1964.       case self::GPS_DIFFERENTIAL:
  1965.         return 'GPSDifferential';
  1966.       }
  1967.  
  1968.     default:
  1969.       return Pel::fmt('Unknown Tag: 0x%04X'$tag);
  1970.     }
  1971.   }
  1972.  
  1973. }
  1974. ?>

Documentation generated on Thu, 05 May 2011 07:19:29 +0200 by phpDocumentor 1.4.3