Krita Source Code Documentation
Loading...
Searching...
No Matches
psd_header.cpp File Reference
#include "psd_header.h"
#include <QIODevice>
#include <QtEndian>
#include <psd_utils.h>

Go to the source code of this file.

Classes

struct  Header
 

Functions

QDebug operator<< (QDebug dbg, const PSDHeader &header)
 

Function Documentation

◆ operator<<()

QDebug operator<< ( QDebug dbg,
const PSDHeader & header )

Definition at line 130 of file psd_header.cpp.

131{
132#ifndef NODEBUG
133 dbg.nospace() << "(valid: " << const_cast<PSDHeader *>(&header)->valid();
134 dbg.nospace() << ", signature: " << header.signature;
135 dbg.nospace() << ", version:" << header.version;
136 dbg.nospace() << ", number of channels: " << header.nChannels;
137 dbg.nospace() << ", height: " << header.height;
138 dbg.nospace() << ", width: " << header.width;
139 dbg.nospace() << ", channel depth: " << header.channelDepth;
140 dbg.nospace() << ", color mode: ";
141 switch (header.colormode) {
142 case (Bitmap):
143 dbg.nospace() << "Bitmap";
144 break;
145 case (Grayscale):
146 dbg.nospace() << "Grayscale";
147 break;
148 case (Indexed):
149 dbg.nospace() << "Indexed";
150 break;
151 case (RGB):
152 dbg.nospace() << "RGB";
153 break;
154 case (CMYK):
155 dbg.nospace() << "CMYK";
156 break;
157 case (MultiChannel):
158 dbg.nospace() << "MultiChannel";
159 break;
160 case (DuoTone):
161 dbg.nospace() << "DuoTone";
162 break;
163 case (Lab):
164 dbg.nospace() << "Lab";
165 break;
166 default:
167 dbg.nospace() << "Unknown";
168 };
169 dbg.nospace() << ")";
170#endif
171 return dbg.nospace();
172}
psd_color_mode colormode
Definition psd_header.h:48
quint16 channelDepth
Definition psd_header.h:47
quint16 version
Definition psd_header.h:43
quint16 nChannels
Definition psd_header.h:44
quint32 height
Definition psd_header.h:45
quint32 width
Definition psd_header.h:46
QString signature
Definition psd_header.h:42
@ Lab
Definition psd.h:58
@ RGB
Definition psd.h:54
@ DuoTone
Definition psd.h:57
@ CMYK
Definition psd.h:55
@ Indexed
Definition psd.h:53
@ MultiChannel
Definition psd.h:56
@ Grayscale
Definition psd.h:52
@ Bitmap
Definition psd.h:51

References Bitmap, PSDHeader::channelDepth, CMYK, PSDHeader::colormode, DuoTone, Grayscale, PSDHeader::height, Indexed, Lab, MultiChannel, PSDHeader::nChannels, RGB, PSDHeader::signature, PSDHeader::version, and PSDHeader::width.