39 quint64 start = io.pos();
65 quint32 rlelength = 0;
77 quint64 sumrlelength = 0;
84 quint16 rlelength16 = 0;
86 rlelength = rlelength16;
92 sumrlelength += rlelength;
113 for (; it != end; ++it) {
114 infoRecords << &(*it);
136 psdwrite(io,
static_cast<quint16
>(compressionType));
147 bool writeAlpha = hasAlpha &&
150 const int numChannels =
155 for (
int i = 0; i < numChannels; i++) {
156 const int rleOffset = io.pos();
158 int channelId = writeAlpha && i == numChannels - 1 ? -1 : i;
163 io.seek(io.pos() + rc.height() *
sizeof(quint16));
const KoColorSpace * colorSpace() const
virtual quint32 channelCount() const =0
virtual quint32 colorChannelCount() const =0
quint64 m_channelDataLength
bool write(QIODevice &io, KisPaintDeviceSP dev, bool hasAlpha, psd_compression_type compressionType)
bool read(QIODevice &io, KisPaintDeviceSP dev)
PSDImageData(PSDHeader *header)
QVector< ChannelInfo > m_channelInfoRecords
QVector< int > m_channelOffsets
void writePixelDataCommon(QIODevice &io, KisPaintDeviceSP dev, const QRect &rc, psd_color_mode colorMode, int channelSize, bool alphaFirst, const bool writeCompressionType, QVector< ChannelWritingInfo > &writingInfoList, psd_compression_type compressionType, psd_byte_order byteOrder)
void readChannels(QIODevice &io, KisPaintDeviceSP device, psd_color_mode colorMode, int channelSize, const QRect &layerRect, QVector< ChannelInfo * > infoRecords, psd_byte_order byteOrder)
std::enable_if_t< std::is_arithmetic< T >::value, bool > psdread(QIODevice &io, T &v)
std::enable_if_t< std::is_arithmetic< T >::value, bool > psdwrite(QIODevice &io, T v)
QVector< quint32 > rleRowLengths
psd_compression_type compressionType
quint64 channelDataLength