[Rawstudio-commit] rawspeed r50 - RawSpeed

Klaus Post klauspost at gmail.com
Sat Jan 31 19:02:08 CET 2009


Author: post
Date: 2009-01-31 19:02:08 +0100 (Sat, 31 Jan 2009)
New Revision: 50

Modified:
   RawSpeed/NefDecoder.cpp
   RawSpeed/RawSpeed.vcproj
Log:
- Nikon CFA metrics.

Modified: RawSpeed/NefDecoder.cpp
===================================================================
--- RawSpeed/NefDecoder.cpp	2009-01-31 15:43:54 UTC (rev 49)
+++ RawSpeed/NefDecoder.cpp	2009-01-31 18:02:08 UTC (rev 50)
@@ -214,5 +214,30 @@
 void NefDecoder::decodeMetaData()
 {
   mRaw->cfa.setCFA(CFA_RED, CFA_GREEN, CFA_GREEN2, CFA_BLUE);
+  vector<TiffIFD*> data = mRootIFD->getIFDsWithTag(MODEL);
 
+  if (data.empty())
+    ThrowRDE("CR2 Decoder: Model name found");
+
+  string model(data[0]->getEntry(MODEL)->getString());
+
+  if (!model.compare("NIKON D100 ") ||
+      !model.compare("NIKON D200") ||
+      !model.compare("NIKON D2H")  ||
+      !model.compare("NIKON D40X") ||
+      !model.compare("NIKON D60") ||
+      !model.compare("NIKON D90") ) 
+  {
+    mRaw->cfa.setCFA(CFA_GREEN2, CFA_BLUE, CFA_RED, CFA_GREEN);   
+  }
+
+  if (!model.compare("NIKON D1 ") ||
+    !model.compare("NIKON D1H") ||
+    !model.compare("NIKON D40")  ||
+    !model.compare("NIKON D50") ||
+    !model.compare("NIKON D70s"))  
+  {
+    mRaw->cfa.setCFA(CFA_BLUE, CFA_GREEN, CFA_GREEN2, CFA_RED);
+  }
+
 }
\ No newline at end of file

Modified: RawSpeed/RawSpeed.vcproj
===================================================================
--- RawSpeed/RawSpeed.vcproj	2009-01-31 15:43:54 UTC (rev 49)
+++ RawSpeed/RawSpeed.vcproj	2009-01-31 18:02:08 UTC (rev 50)
@@ -206,6 +206,14 @@
 				RelativePath=".\rawstudio-plugin-api.cpp"
 				>
 				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
 					Name="Release|Win32"
 					ExcludedFromBuild="true"
 					>
@@ -218,6 +226,14 @@
 				RelativePath=".\rawstudio-plugin.c"
 				>
 				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
 					Name="Release|Win32"
 					ExcludedFromBuild="true"
 					>
@@ -385,6 +401,10 @@
 				>
 			</File>
 			<File
+				RelativePath=".\FileReader.h"
+				>
+			</File>
+			<File
 				RelativePath=".\RawImage.h"
 				>
 			</File>
@@ -397,42 +417,6 @@
 				>
 			</File>
 			<Filter
-				Name="Tiff"
-				>
-				<File
-					RelativePath=".\TiffEntry.h"
-					>
-				</File>
-				<File
-					RelativePath=".\TiffEntryBE.h"
-					>
-				</File>
-				<File
-					RelativePath=".\TiffIFD.h"
-					>
-				</File>
-				<File
-					RelativePath=".\TiffIFDBE.h"
-					>
-				</File>
-				<File
-					RelativePath=".\TiffParser.h"
-					>
-				</File>
-				<File
-					RelativePath=".\TiffParserException.h"
-					>
-				</File>
-				<File
-					RelativePath=".\TiffParserOlympus.h"
-					>
-				</File>
-				<File
-					RelativePath=".\TiffTag.h"
-					>
-				</File>
-			</Filter>
-			<Filter
 				Name="Tools"
 				>
 				<File
@@ -464,13 +448,45 @@
 					>
 				</File>
 				<File
-					RelativePath=".\FileReader.h"
+					RelativePath=".\Point.h"
 					>
 				</File>
-				<File
-					RelativePath=".\Point.h"
+				<Filter
+					Name="Tiff"
 					>
-				</File>
+					<File
+						RelativePath=".\TiffEntry.h"
+						>
+					</File>
+					<File
+						RelativePath=".\TiffEntryBE.h"
+						>
+					</File>
+					<File
+						RelativePath=".\TiffIFD.h"
+						>
+					</File>
+					<File
+						RelativePath=".\TiffIFDBE.h"
+						>
+					</File>
+					<File
+						RelativePath=".\TiffParser.h"
+						>
+					</File>
+					<File
+						RelativePath=".\TiffParserException.h"
+						>
+					</File>
+					<File
+						RelativePath=".\TiffParserOlympus.h"
+						>
+					</File>
+					<File
+						RelativePath=".\TiffTag.h"
+						>
+					</File>
+				</Filter>
 			</Filter>
 			<Filter
 				Name="Decompressors"




More information about the Rawstudio-commit mailing list