diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2014-10-09 21:08:16 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2014-10-09 21:08:16 +0200 |
commit | b34c4d8c337aba6d7d44dfd58087ebd6e2d143e3 (patch) | |
tree | 1f28011425bdb7a577ad23d91d0007b9f215e17d /ksvg/impl/SVGColorProfileElementImpl.cc | |
parent | e76fc32e0582f8bc801fb2c253dc826fb61873ec (diff) | |
download | tdegraphics-b34c4d8c337aba6d7d44dfd58087ebd6e2d143e3.tar.gz tdegraphics-b34c4d8c337aba6d7d44dfd58087ebd6e2d143e3.zip |
Add support for lcms2
Diffstat (limited to 'ksvg/impl/SVGColorProfileElementImpl.cc')
-rw-r--r-- | ksvg/impl/SVGColorProfileElementImpl.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ksvg/impl/SVGColorProfileElementImpl.cc b/ksvg/impl/SVGColorProfileElementImpl.cc index 0aa91e52..f59e7c23 100644 --- a/ksvg/impl/SVGColorProfileElementImpl.cc +++ b/ksvg/impl/SVGColorProfileElementImpl.cc @@ -205,13 +205,13 @@ bool SVGColorProfileElementImpl::loadColorProfile() m_hInput = cmsOpenProfileFromFile(open.latin1(), "r"); m_hOutput = cmsCreate_sRGBProfile(); - unsigned int dwIn = BYTES_SH(2) | CHANNELS_SH(_cmsChannelsOf(m_inputColorSpace)); - unsigned int dwOut = BYTES_SH(2) | CHANNELS_SH(_cmsChannelsOf(m_outputColorSpace)); + unsigned int dwIn = BYTES_SH(2) | CHANNELS_SH(cmsChannelsOf(m_inputColorSpace)); + unsigned int dwOut = BYTES_SH(2) | CHANNELS_SH(cmsChannelsOf(m_outputColorSpace)); if(m_renderingIntent != RENDERING_INTENT_AUTO) - m_hTrans = cmsCreateTransform(m_hInput, dwIn, m_hOutput, dwOut, m_renderingIntent - 2, cmsFLAGS_NOTPRECALC); + m_hTrans = cmsCreateTransform(m_hInput, dwIn, m_hOutput, dwOut, m_renderingIntent - 2, cmsFLAGS_NOOPTIMIZE); else - m_hTrans = cmsCreateTransform(m_hInput, dwIn, m_hOutput, dwOut, cmsTakeRenderingIntent(m_hInput), cmsFLAGS_NOTPRECALC); + m_hTrans = cmsCreateTransform(m_hInput, dwIn, m_hOutput, dwOut, cmsGetHeaderRenderingIntent(m_hInput), cmsFLAGS_NOOPTIMIZE); m_inputColorSpace = cmsGetColorSpace(m_hInput); m_outputColorSpace = cmsGetColorSpace(m_hOutput); @@ -237,7 +237,7 @@ TQRgb SVGColorProfileElementImpl::correctPixel(float r, float g, float b) return tqRgb(0, 0, 0); } - unsigned short input[MAXCHANNELS], output[MAXCHANNELS]; + unsigned short input[cmsMAXCHANNELS], output[cmsMAXCHANNELS]; input[0] = ((unsigned int) r) * 257; input[1] = ((unsigned int) g) * 257; @@ -245,7 +245,7 @@ TQRgb SVGColorProfileElementImpl::correctPixel(float r, float g, float b) cmsDoTransform(m_hTrans, input, output, 1); - if(m_outputColorSpace == icSigRgbData) + if(m_outputColorSpace == cmsSigRgbData) return tqRgb(output[0] / 257, output[1] / 257, output[2] / 257); return tqRgb(0, 0, 0); |