[Rawstudio-commit] r1970 - trunk/src

Anders Brander anders at brander.dk
Sun Aug 31 20:34:33 CEST 2008


Author: abrander
Date: 2008-08-31 20:34:32 +0200 (Sun, 31 Aug 2008)
New Revision: 1970

Modified:
   trunk/src/rs-cms.c
Log:
Do more sanity checks in rs_cms_prepare_transforms().

Modified: trunk/src/rs-cms.c
===================================================================
--- trunk/src/rs-cms.c	2008-08-31 16:33:24 UTC (rev 1969)
+++ trunk/src/rs-cms.c	2008-08-31 18:34:32 UTC (rev 1970)
@@ -200,17 +200,18 @@
 
 	if (cms->enabled)
 	{
-		if (cms->profiles[PROFILE_INPUT])
+		/* FIXME: Propagate fails from cmsIsIntentSupported() to the user somehow! */
+		if (cms->profiles[PROFILE_INPUT] && cmsIsIntentSupported(cms->profiles[PROFILE_INPUT], cms->intent, LCMS_USED_AS_INPUT))
 			in = cms->profiles[PROFILE_INPUT];
 		else
 			in = genericLoadProfile;
 
-		if (cms->profiles[PROFILE_DISPLAY])
+		if (cms->profiles[PROFILE_DISPLAY] && cmsIsIntentSupported(cms->profiles[PROFILE_DISPLAY], cms->intent, LCMS_USED_AS_OUTPUT))
 			di = cms->profiles[PROFILE_DISPLAY];
 		else
 			di = genericRGBProfile;
 
-		if (cms->profiles[PROFILE_EXPORT])
+		if (cms->profiles[PROFILE_EXPORT] && cmsIsIntentSupported(cms->profiles[PROFILE_EXPORT], cms->intent, LCMS_USED_AS_OUTPUT))
 			ex = cms->profiles[PROFILE_EXPORT];
 		else
 			ex = genericRGBProfile;




More information about the Rawstudio-commit mailing list