mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 19:20:28 +08:00
fix exif bug
This commit is contained in:
parent
d2c64b566b
commit
cadb4dee14
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user