694{
695 dbg.nospace() <<
"KoColor (" << color.
colorSpace()->
id();
696
698 for (auto it = channels.constBegin(); it != channels.constEnd(); ++it) {
699
701
702 dbg.nospace() <<
", " << ch->
name() <<
":";
703
706 const quint8 *ptr =
reinterpret_cast<const quint8*
>(color.
data() + ch->
pos());
707 dbg.nospace() << *ptr;
708 break;
710 const quint16 *ptr =
reinterpret_cast<const quint16*
>(color.
data() + ch->
pos());
711 dbg.nospace() << *ptr;
712 break;
714 const quint32 *ptr =
reinterpret_cast<const quint32*
>(color.
data() + ch->
pos());
715 dbg.nospace() << *ptr;
716 break;
718
719#ifdef HAVE_OPENEXR
720 const half *ptr =
reinterpret_cast<const half*
>(color.
data() + ch->
pos());
721 dbg.nospace() << *ptr;
722#else
723 const quint16 *ptr =
reinterpret_cast<const quint16*
>(color.
data() + ch->
pos());
724 dbg.nospace() << "UNSUPPORTED_F16(" << *ptr << ")";
725#endif
726 break;
728 const float *ptr =
reinterpret_cast<const float*
>(color.
data() + ch->
pos());
729 dbg.nospace() << *ptr;
730 break;
732 const double *ptr =
reinterpret_cast<const double*
>(color.
data() + ch->
pos());
733 dbg.nospace() << *ptr;
734 break;
736 const qint8 *ptr =
reinterpret_cast<const qint8*
>(color.
data() + ch->
pos());
737 dbg.nospace() << *ptr;
738 break;
740 const qint16 *ptr =
reinterpret_cast<const qint16*
>(color.
data() + ch->
pos());
741 dbg.nospace() << *ptr;
742 break;
744 const quint8 *ptr =
reinterpret_cast<const quint8*
>(color.
data() + ch->
pos());
745 dbg.nospace() << "undef(" << *ptr << ")";
746 break;
747 }
748 }
749 }
750 dbg.nospace() << ")";
751 return dbg.space();
752}
@ UINT8
use this for an unsigned integer 8bits channel
@ UINT16
use this for an integer 16bits channel
@ OTHER
Use this if the channel is neither an integer or a float.
@ INT16
use this for an integer 16bits channel
@ INT8
use this for an integer 8bits channel
@ FLOAT32
use this for a float 32bits channel
@ FLOAT16
use this for a float 16bits channel
@ UINT32
use this for an unsigned integer 21bits channel
@ FLOAT64
use this for a float 64bits channel
enumChannelValueType channelValueType() const
QList< KoChannelInfo * > channels
const KoColorSpace * colorSpace() const
return the current colorSpace