# HG changeset patch # User nadvornik # Date 1206204239 0 # Node ID 19df9953a5d1f45819ec98d5e498b0c48dbb9c6e # Parent c2923efebfdc223b71f00ca1640f724d3336ff57 crw preview support with exiv2 diff -r c2923efebfdc -r 19df9953a5d1 src/exiv2.cc --- a/src/exiv2.cc Sun Mar 16 14:11:22 2008 +0000 +++ b/src/exiv2.cc Sat Mar 22 16:43:59 2008 +0000 @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -537,6 +538,15 @@ if (map_len < 84 + 4) throw Error(14); offset = getULong(map_data + 84, bigEndian); return; + case Exiv2::ImageType::crw: + { + // Parse the image, starting with a CIFF header component + Exiv2::CiffHeader::AutoPtr parseTree(new Exiv2::CiffHeader); + parseTree->read(map_data, map_len); + CiffComponent *entry = parseTree->findComponent(0x2007, 0); + if (entry) offset = entry->pData() - map_data; + return; + } default: throw Error(3, "RAW");