Ignore:
Timestamp:
Jan 19, 2010, 12:31:32 AM (15 years ago)
Author:
grum
Message:

Change Locale class by L10n class ; add Readers for Nikon and Canon cameras ; some bug corrected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/AMetaData/JpegMetaData/Common/MakerNotesSignatures.class.php

    r4686 r4705  
    3535 * Define the maker notes signatures for the EXIF "MakerNote" tag
    3636 *
     37 * This class provides theses public functions :
     38 *  - (static) getMaker
     39 *  - (static) setExifMaker
     40 *  - (static) getExifMaker
     41 *
    3742 * -----------------------------------------------------------------------------
    3843 */
    3944
    4045  define("MAKER_PENTAX", "Pentax");
     46  define("MAKER_NIKON", "Nikon");
     47  define("MAKER_CANON", "Canon");
    4148
    4249  Class MakerNotesSignatures
     
    5158    const Nikon2Header = "Nikon\x00\x01\x00";
    5259    /** Nikon 3 signature */
    53     const Nikon3Header = "Nikon\x00\x02\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
     60    const Nikon3Header = "Nikon\x00\x02";
    5461    /** Panasonic signature  */
    5562    const PanasonicHeader = "Panasonic\x00\x00\x00";
     
    7481    const FujiFilmHeaderSize  = 12;
    7582    const Nikon2HeaderSize    = 8;
    76     const Nikon3HeaderSize    = 18;
     83    const Nikon3HeaderSize    = 7;
    7784    const PanasonicHeaderSize = 12;
    7885    const PentaxHeaderSize    = 6;
     
    8289    const SonyHeaderSize      = 12;
    8390    const CanonHeaderSize     = 0;
    84     const UnknownHeaderSize     = 0;
     91    const UnknownHeaderSize   = 0;
    8592
     93    static private $exifMaker = "";
    8694
    8795    static public function getMaker($datas)
     
    111119      else
    112120       { return(self::UnknownHeader); }
     121    }
    113122
     123    /**
     124     * this function is used by IFD Reader to store all information about maker
     125     * and camera model
     126     *
     127     * the stored value if used within a grep like "/canon/i" to determine the
     128     * maker note.
     129     * For more information about this tricks see the how the tag 0x927c is
     130     * managed in the function "processSpecialTag" of the file
     131     * IfdReader.class.php
     132     *
     133     * @param String $value : the maker or the camera model
     134     */
     135    static public function setExifMaker($value)
     136    {
     137      if(is_array($value))
     138      {
     139        foreach($value as $val)
     140        {
     141          self::$exifMaker.=$val." ";
     142        }
     143      }
     144      else
     145      {
     146        self::$exifMaker.=$value." ";
     147      }
     148      return(self::$exifMaker);
    114149    }
     150
     151    /**
     152     * this function is used by IFD Reader to store all information about maker
     153     * and camera model
     154     *
     155     * @return String
     156     */
     157    static public function getExifMaker()
     158    {
     159      return(self::$exifMaker);
     160    }
     161
    115162  }
    116163
Note: See TracChangeset for help on using the changeset viewer.