Author: post
Date: 2010-04-25 14:17:44 +0200 (Sun, 25 Apr 2010)
New Revision: 224
Modified:
RawSpeed/NefDecoder.cpp
Log:
NEF uncompressed: Allow to return partial data, if any slices can be read.
Modified: RawSpeed/NefDecoder.cpp
===================================================================
--- RawSpeed/NefDecoder.cpp 2010-04-25 12:15:42 UTC (rev 223)
+++ RawSpeed/NefDecoder.cpp 2010-04-25 12:17:44 UTC (rev 224)
@@ -177,7 +177,14 @@
ByteStream in(mFile->getData(slice.offset), slice.count);
iPoint2D size(width, slice.h);
iPoint2D pos(0, offY);
- readUncompressedRaw(in, size, pos, width*bitPerPixel / 8, bitPerPixel,
true);
+ try {
+ readUncompressedRaw(in, size, pos, width*bitPerPixel / 8, bitPerPixel,
true);
+ } catch (IOException e) {
+ if (i>0)
+ errors.push_back(_strdup(e.what()));
+ else
+ throw;
+ }
offY += slice.h;
}
}
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit