libopenraw
|
Public Types | |
enum | { IFD_NONE = -1, IFD_EXIF = -2, IFD_GPS = -3, IFD_INTEROP = -4 } |
Public Member Functions | |
IFDFileContainer (IO::Stream *file, off_t offset) | |
virtual | ~IFDFileContainer () |
virtual EndianType | isMagicHeader (const char *p, int len) |
IFDDir::Ref | setDirectory (int dir) |
int | countDirectories (void) |
std::vector< IFDDir::Ref > & | directories () |
int | currentDirectory () |
size_t | getDirectoryDataSize () |
int | lastError () const |
int | exifOffsetCorrection () const |
void | setExifOffsetCorrection (int corr) |
Protected Member Functions | |
virtual bool | locateDirsPreHook () |
Definition at line 45 of file ifdfilecontainer.h.
anonymous enum |
due to the way Exif works, we have to set specific index to address these IFD
IFD_NONE |
invalid IFD. Means an error |
IFD_EXIF |
exif IFD: see field 0x6789 in IFD 0 |
IFD_GPS |
GPS IFD: see field 0x8825 in IFD 0 |
IFD_INTEROP |
interoperability IFD: see field 0xa005 in exif IFD |
Definition at line 62 of file ifdfilecontainer.h.
OpenRaw::Internals::IFDFileContainer::IFDFileContainer | ( | IO::Stream * | file, |
off_t | offset | ||
) |
constructor
file | the file handle |
offset | the offset from the start of the file |
Definition at line 40 of file ifdfilecontainer.cpp.
OpenRaw::Internals::IFDFileContainer::~IFDFileContainer | ( | ) | [virtual] |
destructor
Definition at line 49 of file ifdfilecontainer.cpp.
Count the number of image file directories, not including EXIF, GPS and INTEROP.
Definition at line 74 of file ifdfilecontainer.cpp.
Referenced by directories(), and setDirectory().
Get the number of the current directory
std::vector< IFDDir::Ref > & OpenRaw::Internals::IFDFileContainer::directories | ( | ) |
Get the directories, loading them if necessary
Definition at line 87 of file ifdfilecontainer.cpp.
References countDirectories().
Referenced by OpenRaw::Internals::IFDFile::_enumThumbnailSizes().
get the extra data size chunk associated to the current image directory
Definition at line 121 of file ifdfilecontainer.cpp.
References OpenRaw::Internals::RawContainer::m_file, OpenRaw::Internals::RawContainer::readInt32(), and OpenRaw::IO::Stream::seek().
IFDFileContainer::EndianType OpenRaw::Internals::IFDFileContainer::isMagicHeader | ( | const char * | p, |
int | len | ||
) | [virtual] |
Check the IFD magic header
p | the pointer to check |
len | the length of the block to check. Likely to be at least 4. |
subclasses needs to override it for like Olympus RAW
Reimplemented in OpenRaw::Internals::MRWContainer, and OpenRaw::Internals::OrfContainer.
Definition at line 56 of file ifdfilecontainer.cpp.
References OpenRaw::Internals::RawContainer::ENDIAN_BIG, and OpenRaw::Internals::RawContainer::ENDIAN_LITTLE.
int OpenRaw::Internals::IFDFileContainer::lastError | ( | ) | const [inline] |
bool OpenRaw::Internals::IFDFileContainer::locateDirsPreHook | ( | ) | [protected, virtual] |
hook to be called at the start of _locateDirs()
Reimplemented in OpenRaw::Internals::MRWContainer.
Definition at line 144 of file ifdfilecontainer.cpp.
IFDDir::Ref OpenRaw::Internals::IFDFileContainer::setDirectory | ( | int | dir | ) |
Set the current directory
dir | the index of the directory to read, or one of the specific IFD index values that are < -1 |
Definition at line 96 of file ifdfilecontainer.cpp.
References countDirectories().