Ignore:
Timestamp:
Jul 28, 2010, 10:48:17 AM (14 years ago)
Author:
grum
Message:

bug:1686, feature:1718, feature:1719, feature:1688, feature:1692

  • Picture analysis finish with an Error 500 or with a problem of memory limit
  • Coding a DateTime class
  • Make JpegMetadata class tests images lighter
  • Improve performance when the database is filled
  • Add possibility for user to build their own tags
  • ajax management entirely rewritted
Location:
extensions/AMetaData/JpegMetaData
Files:
3 edited

Legend:

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

    r5789 r6722  
    33 * --:: JPEG MetaDatas ::-------------------------------------------------------
    44 *
    5  * Version : 1.0.0
    6  * Date    : 2009/12/26
     5 * Version : 1.0.1
     6 * Date    : 2010-07-24
    77 *
    88 *  Author    : Grum
     
    3939 * | 0.1.0a  | 2009-12-26 |
    4040 * |         |            |
    41  * |         |            |
    42  * |         |            |
     41 * | 1.0.0   |            | * first public release
     42 * |         |            |
     43 * | 1.0.1   | 2010-07-24 | * mantis bug:1686
     44 * |         |            |   . bug reported on IfdReader
     45 * |         |            |     When sub IFD (0x8769) refers to a sub IFD with
     46 * |         |            |     an offset lower than the current IFD, the reader
     47 * |         |            |     loops on the current data block and terminate
     48 * |         |            |     with an error 500 ; fix consist to ignore this
     49 * |         |            |     kind of offset, but it's not the right solution
     50 * |         |            |     (right solution: to be able to read negative
     51 * |         |            |     offset)
     52 * |         |            | * mantis feature : 1719
     53 * |         |            |   . Coding a DateTime class ; used only if there is
     54 * |         |            |     no PHP built-in DateTime class
    4355 * |         |            |
    4456 * |         |            |
     
    112124  define("JPEG_METADATA_DIR", dirname(__FILE__)."/");
    113125
     126  require_once(JPEG_METADATA_DIR."Common/DateTime.class.php");
    114127  require_once(JPEG_METADATA_DIR."Readers/JpegReader.class.php");
    115128  require_once(JPEG_METADATA_DIR."TagDefinitions/MagicTags.class.php");
  • extensions/AMetaData/JpegMetaData/Readers/IfdReader.class.php

    r5222 r6722  
    107107      $this->dataOffset=$offset;
    108108
     109
    109110      $this->skipHeader($this->headerSize);
    110111
     112
     113
    111114      $dataPointer = $this->data->offset();
     115
    112116      /*
    113117       * number of entries is defined byte an UShort at the begining of the
     
    422426           * the returned value is a parsed sub IFD
    423427           */
    424           $returned=new IfdReader($this->data->readASCII(-1,$values-$this->dataOffset), $values, $this->byteOrder);
     428          if($values>$this->dataOffset)
     429          {
     430            $returned=new IfdReader($this->data->readASCII(-1,$values-$this->dataOffset), $values, $this->byteOrder);
     431          }
     432          else
     433          {
     434            /* ELSE implemented with the mantis bug:1686
     435             * when the offset of a sub IFD tag is lower than the offset of the
     436             * current IFD, ignore the sub IFD
     437             *
     438             * A method have to be coded to manage this kind of sub IFD
     439             */
     440            $returned="Feature not implemented: read negative offset";
     441          }
    425442          break;
    426443        case 0x8825: // GPS IFD Pointer, tag 0x8825
Note: See TracChangeset for help on using the changeset viewer.