Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 22842 → Rev 22843

/branches/Version14x/Scribus/scribus/profiles/CMakeLists.txt
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
)
/branches/Version14x/Scribus/scribus/profiles/ISOcoated_v2_300_bas.icc
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/Version14x/Scribus/scribus/profiles/ISOcoated_v2_300_bas.txt
===================================================================
--- branches/Version14x/Scribus/scribus/profiles/ISOcoated_v2_300_bas.txt (nonexistent)
+++ branches/Version14x/Scribus/scribus/profiles/ISOcoated_v2_300_bas.txt (revision 22843)
@@ -0,0 +1,24 @@
+Open Source Initiative OSI - The zlib/libpng License:Licensing
+[OSI Approved License]
+The zlib/libpng License
+
+Copyright (c) 2007-2010, basICColor GmbH
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+claim that you wrote the original software. If you use this software
+in a product, an acknowledgment in the product documentation would be
+appreciated but is not required.
+
+2. Altered source versions must be plainly marked as such, and must not be
+misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source distribution.
+
Index: branches/Version14x/Scribus/scribus/profiles/sRGB_icc22.icm
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/Version14x/Scribus/scribus/profiles/sRGB_icc22.icm
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/Version14x/Scribus/scribus/profiles/sRGB_icc22.txt
===================================================================
--- branches/Version14x/Scribus/scribus/profiles/sRGB_icc22.txt (nonexistent)
+++ branches/Version14x/Scribus/scribus/profiles/sRGB_icc22.txt (revision 22843)
@@ -0,0 +1 @@
+This file is copyleft. Use, modify, and distribute freely as you wish.
\ No newline at end of file
Index: branches/Version14x/Scribus/scribus/scribuscore.cpp
===================================================================
--- branches/Version14x/Scribus/scribus/scribuscore.cpp (revision 22842)
+++ branches/Version14x/Scribus/scribus/scribuscore.cpp (revision 22843)
@@ -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)
+ 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)))
{
- 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();
+ 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( )