26 #include <libopenraw/debug.h> 28 #include "rawfile.hpp" 30 #include "tiffepfile.hpp" 32 #include "ifdfilecontainer.hpp" 34 using namespace Debug;
39 TiffEpFile::TiffEpFile(
const IO::Stream::Ptr &s,
46 IfdDir::Ref TiffEpFile::_locateCfaIfd()
48 const IfdDir::Ref & _mainIfd = mainIfd();
50 std::vector<IfdDir::Ref> subdirs;
52 Trace(DEBUG1) <<
"couldn't find main ifd\n";
55 if (_mainIfd->isPrimary()) {
58 if (!_mainIfd->getSubIFDs(subdirs)) {
60 Trace(DEBUG1) <<
"couldn't find main ifd nor subifds\n";
63 auto i = find_if(subdirs.begin(),
65 [] (
const IfdDir::Ref& e) {
66 return e->isPrimary();
68 if (i != subdirs.end()) {
71 Trace(DEBUG1) <<
"couldn't find a primary subifd\n";
75 IfdDir::Ref TiffEpFile::_locateMainIfd()
77 return m_container->setDirectory(0);
CIFF is the container for CRW files. It is an attempt from Canon to make this a standard. I guess it failed.