Author: post
Date: 2013-09-22 12:57:50 +0200 (Sun, 22 Sep 2013)
New Revision: 590

Modified:
   RawSpeed/DngDecoder.cpp
Log:
Allow DNG images that does not have Make/Model. Thanks to Alex Tutubalin.

Modified: RawSpeed/DngDecoder.cpp
===================================================================
--- RawSpeed/DngDecoder.cpp     2013-09-22 10:27:40 UTC (rev 589)
+++ RawSpeed/DngDecoder.cpp     2013-09-22 10:57:50 UTC (rev 590)
@@ -456,10 +456,21 @@
 
 }
 
+/* DNG Images are assumed to be decodable unless explicitly set so */
 void DngDecoder::checkSupportInternal(CameraMetaData *meta) {
+  if (!(mRootIFD->hasEntryRecursive(MAKE) && 
mRootIFD->hasEntryRecursive(MODEL))) {
+    // Check "Unique Camera Model" instead, uses this for both make + model.
+    if (mRootIFD->hasEntryRecursive(UNIQUECAMERAMODEL)) {
+      string unique = 
mRootIFD->getEntryRecursive(UNIQUECAMERAMODEL)->getString();
+      this->checkCameraSupported(meta, unique, unique, "dng");
+      return;
+    } else {
+      // If we don't have make/model we cannot tell, but still assume yes.
+      return;
+    }
+  }
+
   vector<TiffIFD*> data = mRootIFD->getIFDsWithTag(MODEL);
-  if (data.empty())
-    ThrowRDE("DNG Support check: Model name found");
 
   // We set this, since DNG's are not explicitly added. 
   failOnUnknown = FALSE;


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

Reply via email to