Hi Niklas,
Am Montag, 2. Mai 2016 19:26:32 UTC+2 schrieb Niklas Mischkulnig:
>
> no change:
>
That's really strange. I added some more debug code and some different
methods for creating the input profile.
Could you please test?
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/29cd121c-440f-4bbc-b122-c34c719294a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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
@@ -654,6 +654,12 @@
glDeleteTextures(1, (GLuint*) &numMask);
}
+static
+void ErrorReportingFunction(cmsContext ContextID, cmsUInt32Number ErrorCode, const char *Text)
+{
+ std::cout << "Error: " << Text << " (" << ErrorCode << ")" << std::endl;
+}
+
void TextureManager::TextureInfo::Bind()
{
BindImageTexture();
@@ -867,7 +873,27 @@
cmsHPROFILE inputICC = NULL;
if (!entry->iccProfile->empty())
{
+ cmsSetLogErrorHandler(ErrorReportingFunction);
inputICC = cmsOpenProfileFromMem(entry->iccProfile->data(), entry->iccProfile->size());
+ std::cout << "InputICC size: " << entry->iccProfile->size() << std::endl
+ << "iccProfile: " << hugin_utils::GetICCDesc(*entry->iccProfile) << std::endl
+ << "inputICC: " << hugin_utils::GetICCDesc(inputICC) << std::endl;
+ {
+ cmsContext context = cmsCreateContext(NULL, NULL);
+ cmsHPROFILE profile = cmsOpenProfileFromMemTHR(context, entry->iccProfile->data(), entry->iccProfile->size());
+ cmsSetLogErrorHandlerTHR(context, ErrorReportingFunction);
+ if (profile != NULL)
+ {
+ std::cout << "ICC via context: " << hugin_utils::GetICCDesc(profile) << std::endl;
+ cmsCloseProfile(profile);
+ }
+ else
+ {
+ std::cout << "ICC via context failed." << std::endl;
+ };
+ cmsSetLogErrorHandlerTHR(context, NULL);
+ cmsDeleteContext(context);
+ }
};
cmsHTRANSFORM transform = NULL;
// do color correction only if input image has icc profile or if we found a monitor profile
@@ -880,17 +906,27 @@
{
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;
+ cmsSetLogErrorHandler(NULL);
// 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)