Hi Niklas,

Am Sonntag, 1. Mai 2016 20:13:30 UTC+2 schrieb Niklas Mischkulnig:
>
>
> Here you go:
>
> iccProfile size: 2672
>

new try. I changed the creating of the input icc profile.
All debug message are still in.

Thomas

-- 
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
--- 
You received this message because you are subscribed to the Google Groups 
"hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to hugin-ptx+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/c0a32af4-4266-4895-a940-dfd88a663a7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/hugin1/base_wx/wxcms.cpp b/src/hugin1/base_wx/wxcms.cpp
--- a/src/hugin1/base_wx/wxcms.cpp
+++ b/src/hugin1/base_wx/wxcms.cpp
@@ -28,6 +28,7 @@
 #include <X11/Xlib.h>
 #include "hugin_utils/utils.h"
 #endif
+#include "hugin_utils/utils.h"
 
 namespace HuginBase
 {
@@ -129,6 +130,7 @@
             if (!iccProfile.empty())
             {
                 inputICC = cmsOpenProfileFromMem(iccProfile.data(), iccProfile.size());
+                std::cout << "iccProfile size: " << iccProfile.size() << std::endl;
             };
             // check type of input profile
             if (inputICC != NULL)
@@ -145,6 +147,13 @@
                 inputICC = cmsCreate_sRGBProfile();
             };
             // now build transform
+            std::cout << "CorrectImage" << std::endl
+                << "inputICC: " << hugin_utils::GetICCDesc(inputICC) << std::endl
+                << "outputICC: " << hugin_utils::GetICCDesc(monitorProfile) << std::endl
+                << "TYPE_RGB8: " << TYPE_RGB_8 << std::endl
+                << "INTENT_PERCEPTUAL: " << INTENT_PERCEPTUAL << std::endl
+                << "cmsFLAGS_BLACKPOINTCOMPENSATION: " << cmsFLAGS_BLACKPOINTCOMPENSATION << std::endl;
+
             cmsHTRANSFORM transform = cmsCreateTransform(inputICC, TYPE_RGB_8,
                 monitorProfile, TYPE_RGB_8,
                 INTENT_PERCEPTUAL, cmsFLAGS_BLACKPOINTCOMPENSATION);
diff --git a/src/hugin1/hugin/TextureManager.cpp b/src/hugin1/hugin/TextureManager.cpp
--- a/src/hugin1/hugin/TextureManager.cpp
+++ b/src/hugin1/hugin/TextureManager.cpp
@@ -867,7 +867,9 @@
         cmsHPROFILE inputICC = NULL;
         if (!entry->iccProfile->empty())
         {
-            inputICC = cmsOpenProfileFromMem(entry->iccProfile->data(), entry->iccProfile->size());
+            const vigra::ImageImportInfo::ICCProfile iccProfile(*(entry->iccProfile));
+            inputICC = cmsOpenProfileFromMem(iccProfile.data(), iccProfile.size());
+            std::cout << "InputICC size: " << iccProfile.size() << std::endl;
         };
         cmsHTRANSFORM transform = NULL;
         // do color correction only if input image has icc profile or if we found a monitor profile
@@ -880,17 +882,26 @@
                 {
                     cmsCloseProfile(inputICC);
                     inputICC = NULL;
+                    std::cout << "No RGB profile" << std::endl;
                 };
             };
             // if there is no icc profile in file fall back to sRGB
             if (inputICC == NULL)
             {
                 inputICC = cmsCreate_sRGBProfile();
+                std::cout << "Created generic profile" << std::endl;
             };
+            std::cout << "TexManager" << std::endl
+                << "inputICC: " << hugin_utils::GetICCDesc(inputICC) << std::endl
+                << "monitorProfile: " << huginApp::Get()->GetMonitorProfileName().c_str() << std::endl
+                << "outputICC: " << hugin_utils::GetICCDesc(huginApp::Get()->GetMonitorProfile()) << std::endl
+                << "TYPE_RGB8: " << TYPE_RGB_8 << std::endl
+                << "INTENT_PERCEPTUAL: " << INTENT_PERCEPTUAL << std::endl
+                << "cmsFLAGS_BLACKPOINTCOMPENSATION: " << cmsFLAGS_BLACKPOINTCOMPENSATION << std::endl;
             // now build transform
-            transform = cmsCreateTransform(inputICC, TYPE_RGB_8,
+            /* transform = cmsCreateTransform(inputICC, TYPE_RGB_8,
                 huginApp::Get()->GetMonitorProfile(), TYPE_RGB_8,
-                INTENT_PERCEPTUAL, cmsFLAGS_BLACKPOINTCOMPENSATION);
+                INTENT_PERCEPTUAL, cmsFLAGS_BLACKPOINTCOMPENSATION);*/
         };
         // now perform photometric correction
         if (photometric_correct)

Reply via email to