693{
694 dbg.nospace() <<
"KoColor (" << color.
colorSpace()->
id();
695
697 for (auto it = channels.constBegin(); it != channels.constEnd(); ++it) {
698
700
701 dbg.nospace() <<
", " << ch->
name() <<
":";
702
705 const quint8 *ptr =
reinterpret_cast<const quint8*
>(color.
data() + ch->
pos());
706 dbg.nospace() << *ptr;
707 break;
709 const quint16 *ptr =
reinterpret_cast<const quint16*
>(color.
data() + ch->
pos());
710 dbg.nospace() << *ptr;
711 break;
713 const quint32 *ptr =
reinterpret_cast<const quint32*
>(color.
data() + ch->
pos());
714 dbg.nospace() << *ptr;
715 break;
717
718#ifdef HAVE_OPENEXR
719 const half *ptr =
reinterpret_cast<const half*
>(color.
data() + ch->
pos());
720 dbg.nospace() << *ptr;
721#else
722 const quint16 *ptr =
reinterpret_cast<const quint16*
>(color.
data() + ch->
pos());
723 dbg.nospace() << "UNSUPPORTED_F16(" << *ptr << ")";
724#endif
725 break;
727 const float *ptr =
reinterpret_cast<const float*
>(color.
data() + ch->
pos());
728 dbg.nospace() << *ptr;
729 break;
731 const double *ptr =
reinterpret_cast<const double*
>(color.
data() + ch->
pos());
732 dbg.nospace() << *ptr;
733 break;
735 const qint8 *ptr =
reinterpret_cast<const qint8*
>(color.
data() + ch->
pos());
736 dbg.nospace() << *ptr;
737 break;
739 const qint16 *ptr =
reinterpret_cast<const qint16*
>(color.
data() + ch->
pos());
740 dbg.nospace() << *ptr;
741 break;
743 const quint8 *ptr =
reinterpret_cast<const quint8*
>(color.
data() + ch->
pos());
744 dbg.nospace() << "undef(" << *ptr << ")";
745 break;
746 }
747 }
748 }
749 dbg.nospace() << ")";
750 return dbg.space();
751}
@ 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