source: extensions/AMetaData/JpegMetaData/Readers/MakerNotesReader.class.php

Last change on this file was 4904, checked in by grum, 14 years ago

Optimize some memory leak and some bugged lines of code

  • Property svn:executable set to *
File size: 3.4 KB
Line 
1<?php
2/*
3 * --:: JPEG MetaDatas ::-------------------------------------------------------
4 *
5 *  Author    : Grum
6 *   email    : grum at piwigo.org
7 *   website  : http://photos.grum.fr
8 *
9 *   << May the Little SpaceFrog be with you ! >>
10 *
11 *
12 * +-----------------------------------------------------------------------+
13 * | JpegMetaData - a PHP based Jpeg Metadata manager                      |
14 * +-----------------------------------------------------------------------+
15 * | Copyright(C) 2010  Grum - http://www.grum.fr                          |
16 * +-----------------------------------------------------------------------+
17 * | This program is free software; you can redistribute it and/or modify  |
18 * | it under the terms of the GNU General Public License as published by  |
19 * | the Free Software Foundation                                          |
20 * |                                                                       |
21 * | This program is distributed in the hope that it will be useful, but   |
22 * | WITHOUT ANY WARRANTY; without even the implied warranty of            |
23 * | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
24 * | General Public License for more details.                              |
25 * |                                                                       |
26 * | You should have received a copy of the GNU General Public License     |
27 * | along with this program; if not, write to the Free Software           |
28 * | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
29 * | USA.                                                                  |
30 * +-----------------------------------------------------------------------+
31 *
32 *
33 * -----------------------------------------------------------------------------
34 *
35 * The exif tag 0x927C "MakerNote" is a tag used by the camera maker to manage
36 * their own data.
37 *
38 * In most of case, this tags gives an offset to an extra data block.
39 * And in most of case, this data block is a sub-IFD block
40 *
41 * The MakerNotesReader is a generic class dedicated to read tags from the maker
42 * note sub IFD structure
43 *
44 *
45 * ======> See IfdReader.class.php to know more about an IFD structure <========
46 *
47 * -----------------------------------------------------------------------------
48 *
49 * .. Notes ..
50 *
51 *
52 * The MakerNotesReader class is derived from the IfdReader class.
53 *
54 * ========> See IfdReader.class.php to know more about common methods <========
55 *
56 *
57 * Derived classes :
58 *  - PentaxReader (for Pentax exif tags)
59 *
60 *
61 * This class provides theses public functions :
62 *  - getMaker
63 *
64 *
65 * -----------------------------------------------------------------------------
66 */
67
68  require_once(JPEG_METADATA_DIR."Common/ConvertData.class.php");
69  require_once(JPEG_METADATA_DIR."Common/MakerNotesSignatures.class.php");
70  require_once(JPEG_METADATA_DIR."Common/Tag.class.php");
71  require_once(JPEG_METADATA_DIR."Readers/IfdReader.class.php");
72
73  abstract class MakerNotesReader extends IfdReader
74  {
75    protected $maker = "UNKNOWN";
76
77    function __destruct()
78    {
79      unset($this->maker);
80      parent::__destruct();
81    }
82
83    /**
84     * this function return the name of the camera maker
85     *
86     * @return String
87     */
88    public function getMaker()
89    {
90      return($this->maker);
91    }
92
93    protected function skipHeader($headerSize=0)
94    {
95      parent::skipHeader($headerSize);
96    }
97
98  }
99
100
101
102
103?>
Note: See TracBrowser for help on using the repository browser.