- Timestamp:
- Jan 17, 2010, 7:05:35 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AMetaData/JpegMetaData/Readers/PentaxReader.class.php
r4686 r4698 9 9 * << May the Little SpaceFrog be with you ! >> 10 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 * 11 33 * ----------------------------------------------------------------------------- 12 34 * 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 * 13 39 * ----------------------------------------------------------------------------- 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 * 15 48 * ----------------------------------------------------------------------------- 16 49 */ 17 50 51 52 18 53 require_once(JPEG_METADATA_DIR."TagDefinitions/PentaxTags.class.php"); 19 54 require_once(JPEG_METADATA_DIR."Readers/MakerNotesReader.class.php"); … … 21 56 class PentaxReader extends MakerNotesReader 22 57 { 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 */ 23 75 function __construct($data, $offset, $byteOrder, $makerSignature) 24 76 { … … 39 91 } 40 92 93 94 /** 95 * initialize the definition for Pentax exif tags 96 */ 41 97 protected function initializeTagDef() 42 98 { … … 44 100 } 45 101 102 /** 103 * skip the IFD header 104 */ 46 105 protected function skipHeader($headerSize=0) 47 106 { … … 49 108 } 50 109 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 */ 51 121 protected function processSpecialTag($tagId, $values, $type, $valuesOffset=0) 52 122 { … … 172 242 $returned=53190 -$values; 173 243 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 174 250 case 0x0205: // "ShotInfo", 175 251 case 0x0206: // "AEInfo", … … 192 268 case 0x0222: // "ColorInfo", 193 269 194 /* theses tags decoding is not yet implemented195 * have to take a look on the algorithm in exiftool (it seems to work196 * but I don't understand everything...)197 */198 270 case 0x0029: // "FrameNumber", 199 271 case 0x0041: // "DigitalFilter", … … 207 279 $returned="Not yet implemented;".ConvertData::toHexDump($tagId, ByteType::USHORT)." => ".ConvertData::toHexDump($values, $type); 208 280 break; 209 210 281 } 211 212 282 return($returned); 213 283 } 214 215 284 } 216 285 217 218 286 ?>
Note: See TracChangeset
for help on using the changeset viewer.