Ignore:
Timestamp:
Jan 17, 2010, 7:05:35 PM (14 years ago)
Author:
grum
Message:

[Plugin:AMetaData] Finished to comment the JpegMetaData classes and rename some methods

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/AMetaData/JpegMetaData/Readers/PentaxReader.class.php

    r4686 r4698  
    99 *   << May the Little SpaceFrog be with you ! >>
    1010 *
     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 *
    1133 * -----------------------------------------------------------------------------
    1234 *
     35 * The PentaxReader class is the dedicated to read the specific Pentax tags
     36 *
     37 * ====> See MakerNotesReader.class.php to know more about the structure <======
     38 *
    1339 * -----------------------------------------------------------------------------
    14  * Pentax reader class
     40 *
     41 * .. Notes ..
     42 *
     43 *
     44 * The PentaxReader class is derived from the MakerNotesReader class.
     45 *
     46 * ======> See MakerNotesReader.class.php to know more about common methods <======
     47 *
    1548 * -----------------------------------------------------------------------------
    1649 */
    1750
     51
     52
    1853  require_once(JPEG_METADATA_DIR."TagDefinitions/PentaxTags.class.php");
    1954  require_once(JPEG_METADATA_DIR."Readers/MakerNotesReader.class.php");
     
    2156  class PentaxReader extends MakerNotesReader
    2257  {
     58    /**
     59     * The constructor needs, like the ancestor, the datas to be parsed
     60     *
     61     * Some datas are offset on extra data, and this offset can be (some time)
     62     * absolute inside the IFD, or relative. So, the offset of the IFD structure
     63     * is needed
     64     *
     65     * The byte order can be different from the TIFF byte order !
     66     *
     67     * The constructor need the maker signature (see the MakerNotesSignatures
     68     * class for a list of known signatures)
     69     *
     70     * @param String $data
     71     * @param ULong $offset : offset of IFD block in the jpeg file
     72     * @param String $byteOrder
     73     * @param String $makerSignature :
     74     */
    2375    function __construct($data, $offset, $byteOrder, $makerSignature)
    2476    {
     
    3991    }
    4092
     93
     94    /**
     95     * initialize the definition for Pentax exif tags
     96     */
    4197    protected function initializeTagDef()
    4298    {
     
    44100    }
    45101
     102    /**
     103     * skip the IFD header
     104     */
    46105    protected function skipHeader($headerSize=0)
    47106    {
     
    49108    }
    50109
     110    /**
     111     * this function do the interpretation of specials tags
     112     *
     113     * the function return the interpreted value for the tag
     114     *
     115     * @param $tagId             : the id of the tag
     116     * @param $values            : 'raw' value to be interpreted
     117     * @param UByte $type        : if needed (for IFD structure) the type of data
     118     * @param ULong $valueOffset : if needed, the offset of data in the jpeg file
     119     * @return String or Array or DateTime or Integer or Float...
     120     */
    51121    protected function processSpecialTag($tagId, $values, $type, $valuesOffset=0)
    52122    {
     
    172242          $returned=53190 -$values;
    173243          break;
     244
     245        /* theses tags decoding is not yet implemented
     246         * have to take a look on the algorithm in exiftool (it seems to work
     247         * but I don't understand everything...)
     248         */
     249
    174250        case 0x0205: // "ShotInfo",
    175251        case 0x0206: // "AEInfo",
     
    192268        case 0x0222: // "ColorInfo",
    193269
    194         /* theses tags decoding is not yet implemented
    195          * have to take a look on the algorithm in exiftool (it seems to work
    196          * but I don't understand everything...)
    197          */
    198270        case 0x0029: // "FrameNumber",
    199271        case 0x0041: // "DigitalFilter",
     
    207279          $returned="Not yet implemented;".ConvertData::toHexDump($tagId, ByteType::USHORT)." => ".ConvertData::toHexDump($values, $type);
    208280          break;
    209 
    210281      }
    211 
    212282      return($returned);
    213283    }
    214 
    215284  }
    216285
    217 
    218286?>
Note: See TracChangeset for help on using the changeset viewer.