Krita Source Code Documentation
Loading...
Searching...
No Matches
psd_header.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2009 Boudewijn Rempt <boud@valdyas.org>
3 * SPDX-FileCopyrightText: 2021 L. E. Segovia <amy@amyspark.me>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7#ifndef PSD_HEADER_H
8#define PSD_HEADER_H
9
10#include "kritapsd_export.h"
11
12#include <QtGlobal>
13#include <kis_debug.h>
14#include <psd.h>
15
16class QIODevice;
17
18class KRITAPSD_EXPORT PSDHeader
19{
20public:
21 PSDHeader();
22
31 bool read(QIODevice &device);
32
38 bool write(QIODevice &device);
39
40 bool valid();
41
42 QString signature; // 8PBS
43 quint16 version; // 1 or 2
44 quint16 nChannels; // 1 - 56
45 quint32 height; // 1-30,000 or 1 - 300,000
46 quint32 width; // 1-30,000 or 1 - 300,000
47 quint16 channelDepth; // 1, 8, 16. XXX: check whether 32 is used!
50 bool tiffStyleLayerBlock; // if true, treat layer section as 4-byte aligned blocks
51
52 QString error;
53};
54
55KRITAPSD_EXPORT QDebug operator<<(QDebug dbg, const PSDHeader &header);
56
57#endif // PSD_HEADER_H
psd_color_mode colormode
Definition psd_header.h:48
quint16 channelDepth
Definition psd_header.h:47
quint16 version
Definition psd_header.h:43
bool tiffStyleLayerBlock
Definition psd_header.h:50
quint16 nChannels
Definition psd_header.h:44
quint32 height
Definition psd_header.h:45
quint32 width
Definition psd_header.h:46
QString error
Definition psd_header.h:52
QString signature
Definition psd_header.h:42
psd_byte_order byteOrder
Definition psd_header.h:49
psd_byte_order
Definition psd.h:33
psd_color_mode
Definition psd.h:50
KRITAPSD_EXPORT QDebug operator<<(QDebug dbg, const PSDHeader &header)