Fix CMYK8888 on big-endian platforms
Pick-to: 6.8 Fixes: QTBUG-132875 Change-Id: If7e945607125a5ae5ce1f8323df27ab8481e329c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 7ad2083ec3cbc9dce949e83465973435d0aa992a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
7920772663
commit
4d34eee362
@ -33,15 +33,15 @@ public:
|
|||||||
QCmyk32() = default;
|
QCmyk32() = default;
|
||||||
|
|
||||||
constexpr QCmyk32(int cyan, int magenta, int yellow, int black) :
|
constexpr QCmyk32(int cyan, int magenta, int yellow, int black) :
|
||||||
#if QT_BYTE_ORDER == Q_BIG_ENDIAN
|
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||||
m_cmyk(cyan << 24 | magenta << 16 | yellow << 8 | black)
|
m_cmyk(uint(cyan) << 24 | magenta << 16 | yellow << 8 | black)
|
||||||
#else
|
#else
|
||||||
m_cmyk(cyan | magenta << 8 | yellow << 16 | black << 24)
|
m_cmyk(cyan | magenta << 8 | yellow << 16 | uint(black) << 24)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_BYTE_ORDER == Q_BIG_ENDIAN
|
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||||
constexpr int cyan() const noexcept { return (m_cmyk >> 24) & 0xff; }
|
constexpr int cyan() const noexcept { return (m_cmyk >> 24) & 0xff; }
|
||||||
constexpr int magenta() const noexcept { return (m_cmyk >> 16) & 0xff; }
|
constexpr int magenta() const noexcept { return (m_cmyk >> 16) & 0xff; }
|
||||||
constexpr int yellow() const noexcept { return (m_cmyk >> 8) & 0xff; }
|
constexpr int yellow() const noexcept { return (m_cmyk >> 8) & 0xff; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user