Commit cadb4dee authored by yaohai [姚海]'s avatar yaohai [姚海]

fix exif bug

parent d2c64b56
......@@ -229,7 +229,7 @@ void ExifReader::parseExif()
uint32_t offset = getStartOffset();
size_t numEntry = getNumDirEntry();
size_t numEntry = getNumDirEntry( offset );
offset += 2; //go to start of tag fields
......@@ -303,7 +303,7 @@ uint32_t ExifReader::getStartOffset() const
*
* @return The number of directory entries
*/
size_t ExifReader::getNumDirEntry() const
size_t ExifReader::getNumDirEntry(const size_t offsetNumDir) const
{
return getU16( offsetNumDir );
}
......
......@@ -199,7 +199,7 @@ private:
bool checkTagMark() const;
size_t getFieldSize ();
size_t getNumDirEntry() const;
size_t getNumDirEntry( const size_t offsetNumDir ) const;
uint32_t getStartOffset() const;
uint16_t getExifTag( const size_t offset ) const;
uint16_t getU16( const size_t offset ) const;
......@@ -225,9 +225,6 @@ private:
private:
static const uint16_t tagMarkRequired = 0x2A;
//offset to the _number-of-directory-entry_ field
static const size_t offsetNumDir = 8;
//max size of data in tag.
//'DDDDDDDD' contains the value of that Tag. If its size is over 4bytes,
//'DDDDDDDD' contains the offset to data stored address.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment