erffile.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <iostream>
00023 #include <libopenraw++/thumbnail.h>
00024 #include <libopenraw++/rawdata.h>
00025
00026 #include "debug.h"
00027 #include "ifd.h"
00028 #include "ifdfilecontainer.h"
00029 #include "ifddir.h"
00030 #include "ifdentry.h"
00031 #include "io/file.h"
00032 #include "erffile.h"
00033
00034 using namespace Debug;
00035
00036 namespace OpenRaw {
00037
00038
00039 namespace Internals {
00040
00041 RawFile *ERFFile::factory(const char* _filename)
00042 {
00043 return new ERFFile(_filename);
00044 }
00045
00046 ERFFile::ERFFile(const char* _filename)
00047 : TiffEpFile(_filename, OR_RAWFILE_TYPE_ERF)
00048 {
00049 }
00050
00051
00052 ERFFile::~ERFFile()
00053 {
00054 }
00055
00056
00057 ::or_error ERFFile::_getRawData(RawData & data, uint32_t )
00058 {
00059 ::or_error err;
00060 m_cfaIfd = _locateCfaIfd();
00061 if(m_cfaIfd) {
00062 err = _getRawDataFromDir(data, m_cfaIfd);
00063 }
00064 else {
00065 err = OR_ERROR_NOT_FOUND;
00066 }
00067 return err;
00068 }
00069 }
00070 }
00071