r22842 by jghali - Add new free sRGB profile and use it by default if available

scribus-commit scribus-commit at lists.scribus.net
Sat Feb 23 14:03:58 UTC 2019


Author: jghali
Date: Sat Feb 23 14:03:57 2019
New Revision: 22842

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22842
Log:
Add new free sRGB profile and use it by default if available

Added:
    trunk/Scribus/resources/profiles/sRGB_icc22.icm   (with props)
    trunk/Scribus/resources/profiles/sRGB_icc22.txt
Modified:
    trunk/Scribus/resources/profiles/CMakeLists.txt
    trunk/Scribus/resources/profiles/Readme
    trunk/Scribus/resources/profiles/install.targets
    trunk/Scribus/scribus/scribuscore.cpp

Modified: trunk/Scribus/resources/profiles/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22842&path=/trunk/Scribus/resources/profiles/CMakeLists.txt
==============================================================================
--- trunk/Scribus/resources/profiles/CMakeLists.txt	(original)
+++ trunk/Scribus/resources/profiles/CMakeLists.txt	Sat Feb 23 14:03:57 2019
@@ -10,5 +10,7 @@
 Readme
 sRGB.icm
 srgb.license
+sRGB_icc22.icm
+sRGB_icc22.txt
   DESTINATION ${SHAREDIR}profiles
 )

Modified: trunk/Scribus/resources/profiles/Readme
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22842&path=/trunk/Scribus/resources/profiles/Readme
==============================================================================
--- trunk/Scribus/resources/profiles/Readme	(original)
+++ trunk/Scribus/resources/profiles/Readme	Sat Feb 23 14:03:57 2019
@@ -2,14 +2,13 @@
 for use with Scribus and LittleCMS. By default, Scribus will search in
 ~/.color/icc and /usr/share/color and subdirectories for profiles. 
 
-The two profiles included are generic RGB and CMYK profiles installed to ensure
+The profiles included are generic RGB and CMYK profiles installed to ensure
 color management functions immediately on install. These are not meant to be used
 for exacting color precision.
 
 You can get some sample profiles at: www.littlecms.com and
 there are more links in the documentation under the DTP Links Page, as well as
 the downloads section on www.scribus.net.
-
 
 
 Another source for Profiles is a modern Windows installation,

Modified: trunk/Scribus/resources/profiles/install.targets
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22842&path=/trunk/Scribus/resources/profiles/install.targets
==============================================================================
--- trunk/Scribus/resources/profiles/install.targets	(original)
+++ trunk/Scribus/resources/profiles/install.targets	Sat Feb 23 14:03:57 2019
@@ -43,5 +43,15 @@
 			DestinationFolder="$(OutDir)\share\profiles"
 			SkipUnchangedFiles="true"
 		/>
+		<Copy  
+			SourceFiles="$(MSBuildThisFileDirectory)sRGB_icc22.icm"  
+			DestinationFolder="$(OutDir)\share\profiles"
+			SkipUnchangedFiles="true"
+		/>
+		<Copy  
+			SourceFiles="$(MSBuildThisFileDirectory)sRGB_icc22.txt"  
+			DestinationFolder="$(OutDir)\share\profiles"
+			SkipUnchangedFiles="true"
+		/>
 	</Target>
 </Project>

Modified: trunk/Scribus/scribus/scribuscore.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22842&path=/trunk/Scribus/scribus/scribuscore.cpp
==============================================================================
--- trunk/Scribus/scribus/scribuscore.cpp	(original)
+++ trunk/Scribus/scribus/scribuscore.cpp	Sat Feb 23 14:03:57 2019
@@ -413,15 +413,28 @@
 
 void ScribusCore::InitDefaultColorTransforms()
 {
-	QString defaultRGBString   = "sRGB IEC61966-2.1";
+	QString defaultRGBString;
+	QString defaultRGBString1  = "sRGB display profile (ICC v2.2)";
+	QString defaultRGBString2  = "sRGB IEC61966-2.1";
 	QString defaultCMYKString1 = "ISO Coated v2 300% (basICColor)";
 	QString defaultCMYKString2 = "Fogra27L CMYK Coated Press";
 
 	// Ouvre le profile RGB par d�fault
-	if (InputProfiles.contains(defaultRGBString))
-		defaultRGBProfile = defaultEngine.openProfileFromFile(InputProfiles[defaultRGBString]);
+	if (InputProfiles.contains(defaultRGBString1))
+	{
+		defaultRGBProfile = defaultEngine.openProfileFromFile(InputProfiles[defaultRGBString1]);
+		defaultRGBString = defaultRGBString1;
+	}
+	else if (InputProfiles.contains(defaultRGBString2))
+	{
+		defaultRGBProfile = defaultEngine.openProfileFromFile(InputProfiles[defaultRGBString2]);
+		defaultRGBString = defaultRGBString2;
+	}
 	else
+	{
 		defaultRGBProfile = defaultEngine.createProfile_sRGB();
+		defaultRGBString = defaultRGBString2;
+	}
 
 	// Ouvre le profile CMYK par d�faut
 	if (InputProfilesCMYK.contains(defaultCMYKString1))
@@ -499,54 +512,77 @@
 		return;
 
 	ProfilesL::Iterator ip;
-	if ((m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageRGBProfile.isEmpty()) || (!InputProfiles.contains(m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageRGBProfile)))
-	{
-		ip = InputProfiles.find("sRGB IEC61966-2.1");
+	QString defaultRGBString1 = "sRGB display profile (ICC v2.2)";
+	QString defaultRGBString2 = "sRGB IEC61966-2.1";
+	QString defaultCMYKString1 = "ISO Coated v2 300% (basICColor)";
+	QString defaultCMYKString2 = "Fogra27L CMYK Coated Press";
+
+	QString defaultImageRGBProfile = m_prefsManager->appPrefs.colorPrefs.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();
 		m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageRGBProfile = ip.key();
 	}
-	if ((m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageCMYKProfile.isEmpty()) || (!InputProfilesCMYK.contains(m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageCMYKProfile)))
-	{
-		ip = InputProfilesCMYK.find("ISO Coated v2 300% (basICColor)");
+
+	QString defaultImageCMYKProfile = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageCMYKProfile;
+	if ((defaultImageCMYKProfile.isEmpty()) || (!InputProfilesCMYK.contains(defaultImageCMYKProfile)))
+	{
+		ip = InputProfilesCMYK.find(defaultCMYKString1);
 		if (ip == InputProfilesCMYK.end())
-			ip = InputProfilesCMYK.find("Fogra27L CMYK Coated Press");
+			ip = InputProfilesCMYK.find(defaultCMYKString2);
 		if (ip == InputProfilesCMYK.end())
 			ip = InputProfilesCMYK.begin();
 		m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultImageCMYKProfile = ip.key();
 	}
-	if ((m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile.isEmpty()) || (!InputProfiles.contains(m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile)))
-	{
-		ip = InputProfiles.find("sRGB IEC61966-2.1");
+
+	QString defaultSolidColorRGBProfile = m_prefsManager->appPrefs.colorPrefs.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();
 		m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorRGBProfile = ip.key();
 	}
-	if ((m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorCMYKProfile.isEmpty()) || (!InputProfilesCMYK.contains(m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorCMYKProfile)))
-	{
-		ip = InputProfilesCMYK.find("ISO Coated v2 300% (basICColor)");
+
+	QString defaultSolidColorCMYKProfile = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorCMYKProfile;
+	if ((defaultSolidColorCMYKProfile.isEmpty()) || (!InputProfilesCMYK.contains(defaultSolidColorCMYKProfile)))
+	{
+		ip = InputProfilesCMYK.find(defaultCMYKString1);
 		if (ip == InputProfilesCMYK.end())
-			ip = InputProfilesCMYK.find("Fogra27L CMYK Coated Press");
+			ip = InputProfilesCMYK.find(defaultCMYKString2);
 		if (ip == InputProfilesCMYK.end())
 			ip = InputProfilesCMYK.begin();
 		m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultSolidColorCMYKProfile = ip.key();
 	}
-	if ((m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile.isEmpty()) || (!MonitorProfiles.contains(m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile)))
-	{
-		ip = MonitorProfiles.find("sRGB IEC61966-2.1");
+
+	QString defaultMonitorProfile = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile.isEmpty();
+	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();
 		m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultMonitorProfile = ip.key();
 	}
-	if ((m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultPrinterProfile.isEmpty()) || (!PrinterProfiles.contains(m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultPrinterProfile)))
-	{
-		ip = PrinterProfiles.find("ISO Coated v2 300% (basICColor)");
+
+	QString defaultPrinterProfile = m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultPrinterProfile.isEmpty();
+	if ((defaultPrinterProfile.isEmpty()) || (!PrinterProfiles.contains(defaultPrinterProfile)))
+	{
+		ip = PrinterProfiles.find(defaultCMYKString1);
 		if (ip == PrinterProfiles.end())
-			ip = PrinterProfiles.find("Fogra27L CMYK Coated Press");
+			ip = PrinterProfiles.find(defaultCMYKString2);
 		if (ip == PrinterProfiles.end())
 			ip = PrinterProfiles.begin();
 		m_prefsManager->appPrefs.colorPrefs.DCMSset.DefaultPrinterProfile = ip.key();
 	}
+
 	InitDefaultColorTransforms();
 }
 




More information about the scribus-commit mailing list