From b70c4ad51e763ad05aeb93dcdc22015fdc29ddaf Mon Sep 17 00:00:00 2001 From: Oliver Duis Date: Fri, 13 Apr 2012 17:15:07 +0200 Subject: [PATCH] Fixed NoICM would generate incompatible output image see issue 1320 --- rtengine/simpleprocess.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 112de6ddf..3455245a6 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -494,12 +494,13 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p Glib::ustring outputProfile; if (params.icm.output!="" && params.icm.output!=ColorManagementParams::NoICMString) { outputProfile = params.icm.output; - } + + /* if we'd wanted the RT_sRGB profile we would have selected it else { // use RT_sRGB.icm profile if present, otherwise use LCMS2 profile generate by lab2rgb16b if (settings->verbose) printf("No output profiles set ; looking for the default sRGB profile (\"%s\")...\n", options.rtSettings.srgb.c_str()); outputProfile = options.rtSettings.srgb; - } + }*/ // if iccStore->getProfile send back an object, then iccStore->getContent will do too cmsHPROFILE jprof = iccStore->getProfile(outputProfile); //get outProfile @@ -511,6 +512,10 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p ProfileContent pc = iccStore->getContent (outputProfile); readyImg->setOutputProfile (pc.data, pc.length); } + } else { + // No ICM + readyImg->setOutputProfile (NULL,0); + } } if (!job->initialImage)