Author: post
Date: 2012-03-04 13:56:58 +0100 (Sun, 04 Mar 2012)
New Revision: 410

Modified:
   RawSpeed/SrwDecoder.cpp
Log:
Attempt to guess byteorder on Samsung NX-200.

Modified: RawSpeed/SrwDecoder.cpp
===================================================================
--- RawSpeed/SrwDecoder.cpp     2012-02-27 20:27:24 UTC (rev 409)
+++ RawSpeed/SrwDecoder.cpp     2012-03-04 12:56:58 UTC (rev 410)
@@ -29,7 +29,8 @@
 namespace RawSpeed {
 
 SrwDecoder::SrwDecoder(TiffIFD *rootIFD, FileMap* file):
-    RawDecoder(file), mRootIFD(rootIFD) {
+RawDecoder(file), mRootIFD(rootIFD) {
+  decoderVersion = 1;
 }
 
 SrwDecoder::~SrwDecoder(void) {
@@ -47,6 +48,8 @@
   TiffIFD* raw = data[0];
 
   int compression = raw->getEntry(COMPRESSION)->getInt();
+  int bits = raw->getEntry(BITSPERSAMPLE)->getInt();
+
   if (32769 != compression && 32770 != compression )
     ThrowRDE("Srw Decoder: Unsupported compression");
 
@@ -58,7 +61,7 @@
 
   if (32770 == compression)
   {
-    this->decodeUncompressed(raw, true);
+    this->decodeUncompressed(raw, bits == 12);
     return mRaw;
   }
   ThrowRDE("Srw Decoder: Unsupported compression");


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to