Author: post
Date: 2013-09-21 19:43:04 +0200 (Sat, 21 Sep 2013)
New Revision: 587

Modified:
   RawSpeed/Rw2Decoder.cpp
Log:
Read blacklevels from Panasonic metadata.

Modified: RawSpeed/Rw2Decoder.cpp
===================================================================
--- RawSpeed/Rw2Decoder.cpp     2013-09-20 20:44:15 UTC (rev 586)
+++ RawSpeed/Rw2Decoder.cpp     2013-09-21 17:43:04 UTC (rev 587)
@@ -98,6 +98,12 @@
     input_start = new ByteStream(mFile->getData(off), mFile->getSize() - off);
     DecodeRw2();
   }
+  // Read blacklevels
+  if (raw->hasEntry((TiffTag)0x1c) && raw->hasEntry((TiffTag)0x1d) && 
raw->hasEntry((TiffTag)0x1e)) {
+    mRaw->blackLevelSeparate[0] = raw->getEntry((TiffTag)0x1c)->getInt() + 15;
+    mRaw->blackLevelSeparate[1] = mRaw->blackLevelSeparate[2] = 
raw->getEntry((TiffTag)0x1d)->getInt() + 15;
+    mRaw->blackLevelSeparate[3] = raw->getEntry((TiffTag)0x1e)->getInt() + 15;
+  }
   return mRaw;
 }
 


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

Reply via email to