Author: post
Date: 2012-08-04 14:51:58 +0200 (Sat, 04 Aug 2012)
New Revision: 442

Modified:
   RawSpeed/PefDecoder.cpp
Log:
Read black level from PEF files. Should affect most Pentax cameras.

Modified: RawSpeed/PefDecoder.cpp
===================================================================
--- RawSpeed/PefDecoder.cpp     2012-07-28 16:05:49 UTC (rev 441)
+++ RawSpeed/PefDecoder.cpp     2012-08-04 12:51:58 UTC (rev 442)
@@ -110,6 +110,14 @@
     iso = mRootIFD->getEntryRecursive(ISOSPEEDRATINGS)->getInt();
 
   setMetaData(meta, make, model, "", iso);
+
+  // Read black level
+  if (mRootIFD->hasEntryRecursive((TiffTag)0x200)) {
+    TiffEntry *black = mRootIFD->getEntryRecursive((TiffTag)0x200);
+    const ushort16 *levels = black->getShortArray();
+    for (int i = 0; i < 4; i++)
+      mRaw->blackLevelSeparate[i] = levels[i];
+  }
 }
 
 } // namespace RawSpeed


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

Reply via email to