Author: post
Date: 2009-07-27 22:31:06 +0200 (Mon, 27 Jul 2009)
New Revision: 89

Modified:
   RawSpeed/NefDecoder.cpp
   RawSpeed/NikonDecompressor.cpp
Log:
- Set Nikon scale on images based on compression scheme (12 vs 14 bit).

Modified: RawSpeed/NefDecoder.cpp
===================================================================
--- RawSpeed/NefDecoder.cpp     2009-07-27 20:21:48 UTC (rev 88)
+++ RawSpeed/NefDecoder.cpp     2009-07-27 20:31:06 UTC (rev 89)
@@ -229,9 +229,17 @@
   if (data.empty())
     ThrowRDE("NEF Meta Decoder: Model name found");
 
+  int white = mRaw->whitePoint;
+  int black = mRaw->blackLevel;
+
   string make = data[0]->getEntry(MAKE)->getString();
   string model = data[0]->getEntry(MODEL)->getString();
 
   setMetaData(meta, make, model,"");
 
+  if (white!=65536)
+    mRaw->whitePoint = white;
+  if (black>=0)
+    mRaw->blackLevel = black;
+
 }
\ No newline at end of file

Modified: RawSpeed/NikonDecompressor.cpp
===================================================================
--- RawSpeed/NikonDecompressor.cpp      2009-07-27 20:21:48 UTC (rev 88)
+++ RawSpeed/NikonDecompressor.cpp      2009-07-27 20:31:06 UTC (rev 89)
@@ -97,6 +97,9 @@
   while (curve[_max-2] == curve[_max-1]) _max--; 
   initTable(huffSelect);
 
+  mRaw->whitePoint = curve[_max-1];
+  mRaw->blackLevel = curve[0];
+
   guint x, y;
   bits = new BitPumpMSB(mFile->getData(offset), size);
   guchar *draw = mRaw->getData();


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

Reply via email to