2
For general Scribus (>=1.3.2) copyright and licensing information please refer
3
to the COPYING file provided with the program. Following this notice may exist
4
a copyright and/or license notice that predates the release of Scribus 1.3.2
5
for which a new license (GPL+exception) is in place.
8
#ifndef SCLCMS2COLORMGMTENGINEIMPL_H
9
#define SCLCMS2COLORMGMTENGINEIMPL_H
14
#include "sccolormgmtenginedata.h"
15
#include "sccolorprofilecache.h"
17
class ScLcms2ColorMgmtEngineImpl : public ScColorMgmtEngineData
19
friend class ScLcms2ColorProfileImpl;
20
friend class ScLcms2ColorTransformImpl;
23
ScLcms2ColorMgmtEngineImpl();
25
// function for getting available profile in a directory
26
virtual QList<ScColorProfileInfo> getAvailableProfileInfo(const QString& directory, bool recursive);
28
// functions for opening icc profiles
29
virtual ScColorProfile openProfileFromFile(const QString& filePath);
30
virtual ScColorProfile openProfileFromMem (const QByteArray& array);
32
// functions for creating profiles
33
virtual ScColorProfile createProfile_sRGB();
34
virtual ScColorProfile createProfile_Lab ();
36
// functions for creating transforms
37
virtual ScColorTransform createTransform(const ScColorProfile& inputProfile , eColorFormat inputFormat,
38
const ScColorProfile& outputProfile, eColorFormat outputFormat,
39
eRenderIntent renderIntent, long transformFlags);
40
virtual ScColorTransform createProofingTransform(const ScColorProfile& inputProfile , eColorFormat inputFormat,
41
const ScColorProfile& outputProfile, eColorFormat outputFormat,
42
const ScColorProfile& proofing, eRenderIntent renderIntent,
43
eRenderIntent proofingIntent, long transformFlags);
47
// Color profile cache
48
static QSharedPointer<ScColorProfileCache> m_profileCache;
50
// Color transform cache
51
static QSharedPointer<ScColorTransformPool> m_transformPool;
53
static cmsUInt32Number translateFlagsToLcmsFlags(long flags);
54
static cmsUInt32Number translateFormatToLcmsFormat(eColorFormat format);
55
static int translateIntentToLcmsIntent(eRenderIntent intent, eRenderIntent defaut = Intent_Relative_Colorimetric);
56
static eColorSpaceType translateLcmsColorSpaceType(cmsColorSpaceSignature);
57
static eProfileClass translateLcmsProfileClass(cmsProfileClassSignature);
60
\brief Simple error handler for use in conjunction with littlecms
61
\param ErrorCode error code issued by little cms
62
\param ErrorText error message corresponding to the error code
64
static void cmsErrorHandler(cmsContext contextID, cmsUInt32Number ErrorCode, const char *ErrorText);