Hi Niklas,

Am Sonntag, 1. Mai 2016 18:32:16 UTC+2 schrieb Niklas Mischkulnig:
>
> Hi Thomas, 
>
> yes it shows the image with wrong colors. Is it normal, that inputICC is 
> empty in the TexManager?
>

no, it is not normal. Good catch. 
I was looking all the time at the output side, but the output shows clearly 
there is something wrong on the input side.
Can you applied the extended patch? It will print more information about 
the input profile.

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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/e79c238b-2d5c-4f9c-8545-557b690e435a%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
@@ -868,6 +868,8 @@
         if (!entry->iccProfile->empty())
         {
             inputICC = cmsOpenProfileFromMem(entry->iccProfile->data(), entry->iccProfile->size());
+            std::cout << "InputICC size: " << entry->iccProfile->size() << std::endl
+                << "size2: " << entry->iccProfile.get()->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