r22843 by jghali - Add new free sRGB and CMYK profiles: the new profiles are used by default if the non free CMYK and sRGB ones are not available

scribus-commit scribus-commit at lists.scribus.net
Sat Feb 23 14:11:37 UTC 2019


Author: jghali
Date: Sat Feb 23 14:11:37 2019
New Revision: 22843

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22843
Log:
Add new free sRGB and CMYK profiles: the new profiles are used by default if the non free CMYK and sRGB ones are not available

Added:
    branches/Version14x/Scribus/scribus/profiles/ISOcoated_v2_300_bas.icc   (with props)
    branches/Version14x/Scribus/scribus/profiles/ISOcoated_v2_300_bas.txt
    branches/Version14x/Scribus/scribus/profiles/sRGB_icc22.icm   (with props)
    branches/Version14x/Scribus/scribus/profiles/sRGB_icc22.txt
Modified:
    branches/Version14x/Scribus/scribus/profiles/CMakeLists.txt
    branches/Version14x/Scribus/scribus/scribuscore.cpp

Modified: branches/Version14x/Scribus/scribus/profiles/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22843&path=/branches/Version14x/Scribus/scribus/profiles/CMakeLists.txt
==============================================================================
--- branches/Version14x/Scribus/scribus/profiles/CMakeLists.txt	(original)
+++ branches/Version14x/Scribus/scribus/profiles/CMakeLists.txt	Sat Feb 23 14:11:37 2019
@@ -5,8 +5,12 @@
 INSTALL(FILES
 GenericCMYK.icm
 GenericCMYK.txt
+ISOcoated_v2_300_bas.icc
+ISOcoated_v2_300_bas.txt
 Readme
 sRGB.icm
 srgb.license
+sRGB_icc22.icm
+sRGB_icc22.txt
   DESTINATION ${SHAREDIR}profiles
 )

Modified: branches/Version14x/Scribus/scribus/scribuscore.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22843&path=/branches/Version14x/Scribus/scribus/scribuscore.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scribuscore.cpp	(original)
+++ branches/Version14x/Scribus/scribus/scribuscore.cpp	Sat Feb 23 14:11:37 2019
@@ -427,19 +427,26 @@
 
 void ScribusCore::InitDefaultColorTransforms(void)
 {
+	QString defaultRGBString1  = "sRGB display profile (ICC v2.2)";
+	QString defaultRGBString2  = "sRGB IEC61966-2.1";
+	QString defaultCMYKString1 = "Fogra27L CMYK Coated Press";
+	QString defaultCMYKString2 = "ISO Coated v2 300% (basICColor)";
+
 	TermDefaultColorTransforms();
 
 	// Ouvre le profile RGB par d�fault
-	if (InputProfiles.contains("sRGB IEC61966-2.1"))
-		defaultRGBProfile = ScColorMgmtEngine::openProfileFromFile(InputProfiles["sRGB IEC61966-2.1"]);
+	if (InputProfiles.contains(defaultRGBString1))
+		defaultRGBProfile = ScColorMgmtEngine::openProfileFromFile(InputProfiles[defaultRGBString1]);
+	else if (InputProfiles.contains(defaultRGBString2))
+		defaultRGBProfile = ScColorMgmtEngine::openProfileFromFile(InputProfiles[defaultRGBString2]);
 	else
 		defaultRGBProfile = ScColorMgmtEngine::createProfile_sRGB();
 
 	// Ouvre le profile CMYK par d�faut
-	if (InputProfilesCMYK.contains("Fogra27L CMYK Coated Press"))
-	{
-		defaultCMYKProfile = ScColorMgmtEngine::openProfileFromFile(InputProfilesCMYK["Fogra27L CMYK Coated Press"]);
-	}
+	if (InputProfilesCMYK.contains(defaultCMYKString1))
+		defaultCMYKProfile = ScColorMgmtEngine::openProfileFromFile(InputProfilesCMYK[defaultCMYKString1]);
+	else if (InputProfilesCMYK.contains(defaultCMYKString2))
+		defaultCMYKProfile = ScColorMgmtEngine::openProfileFromFile(InputProfilesCMYK[defaultCMYKString2]);
 
 	if (!defaultRGBProfile || !defaultCMYKProfile)
 	{
@@ -481,53 +488,82 @@
 
 void ScribusCore::initCMS()
 {
-	if (m_HaveCMS)
-	{
-		ProfilesL::Iterator ip;
-		if ((prefsManager->appPrefs.DCMSset.DefaultImageRGBProfile.isEmpty()) || (!InputProfiles.contains(prefsManager->appPrefs.DCMSset.DefaultImageRGBProfile)))
-		{
-			ip = InputProfiles.find("sRGB IEC61966-2.1");
-			if (ip == InputProfiles.end())
-				ip = InputProfiles.begin();
-			prefsManager->appPrefs.DCMSset.DefaultImageRGBProfile = ip.key();
-		}
-		if ((prefsManager->appPrefs.DCMSset.DefaultImageCMYKProfile.isEmpty()) || (!InputProfilesCMYK.contains(prefsManager->appPrefs.DCMSset.DefaultImageCMYKProfile)))
-		{
-			ip = InputProfilesCMYK.find("Fogra27L CMYK Coated Press");
-			if (ip == InputProfilesCMYK.end())
-				ip = InputProfilesCMYK.begin();
-			prefsManager->appPrefs.DCMSset.DefaultImageCMYKProfile = ip.key();
-		}
-		if ((prefsManager->appPrefs.DCMSset.DefaultSolidColorRGBProfile.isEmpty()) || (!InputProfiles.contains(prefsManager->appPrefs.DCMSset.DefaultSolidColorRGBProfile)))
-		{
-			ip = InputProfiles.find("sRGB IEC61966-2.1");
-			if (ip == InputProfiles.end())
-				ip = InputProfiles.begin();
-			prefsManager->appPrefs.DCMSset.DefaultSolidColorRGBProfile = ip.key();
-		}
-		if ((prefsManager->appPrefs.DCMSset.DefaultSolidColorCMYKProfile.isEmpty()) || (!InputProfilesCMYK.contains(prefsManager->appPrefs.DCMSset.DefaultSolidColorCMYKProfile)))
-		{
-			ip = InputProfilesCMYK.find("Fogra27L CMYK Coated Press");
-			if (ip == InputProfilesCMYK.end())
-				ip = InputProfilesCMYK.begin();
-			prefsManager->appPrefs.DCMSset.DefaultSolidColorCMYKProfile = ip.key();
-		}
-		if ((prefsManager->appPrefs.DCMSset.DefaultMonitorProfile.isEmpty()) || (!MonitorProfiles.contains(prefsManager->appPrefs.DCMSset.DefaultMonitorProfile)))
-		{
-			ip = MonitorProfiles.find("sRGB IEC61966-2.1");
-			if (ip == MonitorProfiles.end())
-				ip = MonitorProfiles.begin();
-			prefsManager->appPrefs.DCMSset.DefaultMonitorProfile = ip.key();
-		}
-		if ((prefsManager->appPrefs.DCMSset.DefaultPrinterProfile.isEmpty()) || (!PrinterProfiles.contains(prefsManager->appPrefs.DCMSset.DefaultPrinterProfile)))
-		{
-			ip = PrinterProfiles.find("Fogra27L CMYK Coated Press");
-			if (ip == PrinterProfiles.end())
-				ip = PrinterProfiles.begin();
-			prefsManager->appPrefs.DCMSset.DefaultPrinterProfile = ip.key();
-		}
-		InitDefaultColorTransforms();
-	}
+	if (!m_HaveCMS)
+		return;
+
+	ProfilesL::Iterator ip;
+	QString defaultRGBString1  = "sRGB display profile (ICC v2.2)";
+	QString defaultRGBString2  = "sRGB IEC61966-2.1";
+	QString defaultCMYKString1 = "Fogra27L CMYK Coated Press";
+	QString defaultCMYKString2 = "ISO Coated v2 300% (basICColor)";
+
+	QString defaultImageRGBProfile = prefsManager->appPrefs.DCMSset.DefaultImageRGBProfile;
+	if ((defaultImageRGBProfile.isEmpty()) || (!InputProfiles.contains(defaultImageRGBProfile)))
+	{
+		ip = InputProfiles.find(defaultRGBString1);
+		if (ip == InputProfiles.end())
+			ip = InputProfiles.find(defaultRGBString2);
+		if (ip == InputProfiles.end())
+			ip = InputProfiles.begin();
+		prefsManager->appPrefs.DCMSset.DefaultImageRGBProfile = ip.key();
+	}
+
+	QString defaultImageCMYKProfile = prefsManager->appPrefs.DCMSset.DefaultImageCMYKProfile;
+	if ((defaultImageCMYKProfile.isEmpty()) || (!InputProfilesCMYK.contains(defaultImageCMYKProfile)))
+	{
+		ip = InputProfilesCMYK.find(defaultCMYKString1);
+		if (ip == InputProfilesCMYK.end())
+			ip = InputProfilesCMYK.find(defaultCMYKString2);
+		if (ip == InputProfilesCMYK.end())
+			ip = InputProfilesCMYK.begin();
+		prefsManager->appPrefs.DCMSset.DefaultImageCMYKProfile = ip.key();
+	}
+
+	QString defaultSolidColorRGBProfile = prefsManager->appPrefs.DCMSset.DefaultSolidColorRGBProfile;
+	if ((defaultSolidColorRGBProfile.isEmpty()) || (!InputProfiles.contains(defaultSolidColorRGBProfile)))
+	{
+		ip = InputProfiles.find(defaultRGBString1);
+		if (ip == InputProfiles.end())
+			ip = InputProfiles.find(defaultRGBString2);
+		if (ip == InputProfiles.end())
+			ip = InputProfiles.begin();
+		prefsManager->appPrefs.DCMSset.DefaultSolidColorRGBProfile = ip.key();
+	}
+
+	QString defaultSolidColorCMYKProfile = prefsManager->appPrefs.DCMSset.DefaultSolidColorCMYKProfile;
+	if ((defaultSolidColorCMYKProfile.isEmpty()) || (!InputProfilesCMYK.contains(defaultSolidColorCMYKProfile)))
+	{
+		ip = InputProfilesCMYK.find(defaultCMYKString1);
+		if (ip == InputProfilesCMYK.end())
+			ip = InputProfilesCMYK.find(defaultCMYKString2);
+		if (ip == InputProfilesCMYK.end())
+			ip = InputProfilesCMYK.begin();
+		prefsManager->appPrefs.DCMSset.DefaultSolidColorCMYKProfile = ip.key();
+	}
+
+	QString defaultMonitorProfile = prefsManager->appPrefs.DCMSset.DefaultMonitorProfile;
+	if ((defaultMonitorProfile.isEmpty()) || (!MonitorProfiles.contains(defaultMonitorProfile)))
+	{
+		ip = MonitorProfiles.find(defaultRGBString1);
+		if (ip == MonitorProfiles.end())
+			ip = MonitorProfiles.find(defaultRGBString2);
+		if (ip == MonitorProfiles.end())
+			ip = MonitorProfiles.begin();
+		prefsManager->appPrefs.DCMSset.DefaultMonitorProfile = ip.key();
+	}
+
+	QString defaultPrinterProfile = prefsManager->appPrefs.DCMSset.DefaultPrinterProfile;
+	if ((defaultPrinterProfile.isEmpty()) || (!PrinterProfiles.contains(defaultPrinterProfile)))
+	{
+		ip = PrinterProfiles.find(defaultCMYKString1);
+		if (ip == PrinterProfiles.end())
+			ip = PrinterProfiles.find(defaultCMYKString2);
+		if (ip == PrinterProfiles.end())
+			ip = PrinterProfiles.begin();
+		prefsManager->appPrefs.DCMSset.DefaultPrinterProfile = ip.key();
+	}
+
+	InitDefaultColorTransforms();
 }
 
 ScribusMainWindow * ScribusCore::primaryMainWindow( )




More information about the scribus-commit mailing list