7#include <QtCore/qmath.h>
8#include <QtCore/qendian.h>
9#include <QtCore/qregularexpression.h>
10#include <QtCore/qbuffer.h>
11#include <QtGui/qimage.h>
13#ifndef QT_NO_DATASTREAM
20 qRgb(0xFF, 0xFF, 0xFF),
21 qRgb(0x00, 0x00, 0x00)
26 qRgb(0xFF, 0xFF, 0xFF),
27 qRgb(0xFC, 0xF3, 0x05),
28 qRgb(0xFF, 0x64, 0x02),
29 qRgb(0xDD, 0x08, 0x06),
30 qRgb(0xF2, 0x08, 0x84),
31 qRgb(0x46, 0x00, 0xA5),
32 qRgb(0x00, 0x00, 0xD4),
33 qRgb(0x02, 0xAB, 0xEA),
34 qRgb(0x1F, 0xB7, 0x14),
35 qRgb(0x00, 0x64, 0x11),
36 qRgb(0x56, 0x2C, 0x05),
37 qRgb(0x90, 0x71, 0x3A),
38 qRgb(0xC0, 0xC0, 0xC0),
39 qRgb(0x80, 0x80, 0x80),
40 qRgb(0x40, 0x40, 0x40),
41 qRgb(0x00, 0x00, 0x00)
46 qRgb(0xFF, 0xFF, 0xFF),
47 qRgb(0xFF, 0xFF, 0xCC),
48 qRgb(0xFF, 0xFF, 0x99),
49 qRgb(0xFF, 0xFF, 0x66),
50 qRgb(0xFF, 0xFF, 0x33),
51 qRgb(0xFF, 0xFF, 0x00),
52 qRgb(0xFF, 0xCC, 0xFF),
53 qRgb(0xFF, 0xCC, 0xCC),
54 qRgb(0xFF, 0xCC, 0x99),
55 qRgb(0xFF, 0xCC, 0x66),
56 qRgb(0xFF, 0xCC, 0x33),
57 qRgb(0xFF, 0xCC, 0x00),
58 qRgb(0xFF, 0x99, 0xFF),
59 qRgb(0xFF, 0x99, 0xCC),
60 qRgb(0xFF, 0x99, 0x99),
61 qRgb(0xFF, 0x99, 0x66),
62 qRgb(0xFF, 0x99, 0x33),
63 qRgb(0xFF, 0x99, 0x00),
64 qRgb(0xFF, 0x66, 0xFF),
65 qRgb(0xFF, 0x66, 0xCC),
66 qRgb(0xFF, 0x66, 0x99),
67 qRgb(0xFF, 0x66, 0x66),
68 qRgb(0xFF, 0x66, 0x33),
69 qRgb(0xFF, 0x66, 0x00),
70 qRgb(0xFF, 0x33, 0xFF),
71 qRgb(0xFF, 0x33, 0xCC),
72 qRgb(0xFF, 0x33, 0x99),
73 qRgb(0xFF, 0x33, 0x66),
74 qRgb(0xFF, 0x33, 0x33),
75 qRgb(0xFF, 0x33, 0x00),
76 qRgb(0xFF, 0x00, 0xFF),
77 qRgb(0xFF, 0x00, 0xCC),
78 qRgb(0xFF, 0x00, 0x99),
79 qRgb(0xFF, 0x00, 0x66),
80 qRgb(0xFF, 0x00, 0x33),
81 qRgb(0xFF, 0x00, 0x00),
82 qRgb(0xCC, 0xFF, 0xFF),
83 qRgb(0xCC, 0xFF, 0xCC),
84 qRgb(0xCC, 0xFF, 0x99),
85 qRgb(0xCC, 0xFF, 0x66),
86 qRgb(0xCC, 0xFF, 0x33),
87 qRgb(0xCC, 0xFF, 0x00),
88 qRgb(0xCC, 0xCC, 0xFF),
89 qRgb(0xCC, 0xCC, 0xCC),
90 qRgb(0xCC, 0xCC, 0x99),
91 qRgb(0xCC, 0xCC, 0x66),
92 qRgb(0xCC, 0xCC, 0x33),
93 qRgb(0xCC, 0xCC, 0x00),
94 qRgb(0xCC, 0x99, 0xFF),
95 qRgb(0xCC, 0x99, 0xCC),
96 qRgb(0xCC, 0x99, 0x99),
97 qRgb(0xCC, 0x99, 0x66),
98 qRgb(0xCC, 0x99, 0x33),
99 qRgb(0xCC, 0x99, 0x00),
100 qRgb(0xCC, 0x66, 0xFF),
101 qRgb(0xCC, 0x66, 0xCC),
102 qRgb(0xCC, 0x66, 0x99),
103 qRgb(0xCC, 0x66, 0x66),
104 qRgb(0xCC, 0x66, 0x33),
105 qRgb(0xCC, 0x66, 0x00),
106 qRgb(0xCC, 0x33, 0xFF),
107 qRgb(0xCC, 0x33, 0xCC),
108 qRgb(0xCC, 0x33, 0x99),
109 qRgb(0xCC, 0x33, 0x66),
110 qRgb(0xCC, 0x33, 0x33),
111 qRgb(0xCC, 0x33, 0x00),
112 qRgb(0xCC, 0x00, 0xFF),
113 qRgb(0xCC, 0x00, 0xCC),
114 qRgb(0xCC, 0x00, 0x99),
115 qRgb(0xCC, 0x00, 0x66),
116 qRgb(0xCC, 0x00, 0x33),
117 qRgb(0xCC, 0x00, 0x00),
118 qRgb(0x99, 0xFF, 0xFF),
119 qRgb(0x99, 0xFF, 0xCC),
120 qRgb(0x99, 0xFF, 0x99),
121 qRgb(0x99, 0xFF, 0x66),
122 qRgb(0x99, 0xFF, 0x33),
123 qRgb(0x99, 0xFF, 0x00),
124 qRgb(0x99, 0xCC, 0xFF),
125 qRgb(0x99, 0xCC, 0xCC),
126 qRgb(0x99, 0xCC, 0x99),
127 qRgb(0x99, 0xCC, 0x66),
128 qRgb(0x99, 0xCC, 0x33),
129 qRgb(0x99, 0xCC, 0x00),
130 qRgb(0x99, 0x99, 0xFF),
131 qRgb(0x99, 0x99, 0xCC),
132 qRgb(0x99, 0x99, 0x99),
133 qRgb(0x99, 0x99, 0x66),
134 qRgb(0x99, 0x99, 0x33),
135 qRgb(0x99, 0x99, 0x00),
136 qRgb(0x99, 0x66, 0xFF),
137 qRgb(0x99, 0x66, 0xCC),
138 qRgb(0x99, 0x66, 0x99),
139 qRgb(0x99, 0x66, 0x66),
140 qRgb(0x99, 0x66, 0x33),
141 qRgb(0x99, 0x66, 0x00),
142 qRgb(0x99, 0x33, 0xFF),
143 qRgb(0x99, 0x33, 0xCC),
144 qRgb(0x99, 0x33, 0x99),
145 qRgb(0x99, 0x33, 0x66),
146 qRgb(0x99, 0x33, 0x33),
147 qRgb(0x99, 0x33, 0x00),
148 qRgb(0x99, 0x00, 0xFF),
149 qRgb(0x99, 0x00, 0xCC),
150 qRgb(0x99, 0x00, 0x99),
151 qRgb(0x99, 0x00, 0x66),
152 qRgb(0x99, 0x00, 0x33),
153 qRgb(0x99, 0x00, 0x00),
154 qRgb(0x66, 0xFF, 0xFF),
155 qRgb(0x66, 0xFF, 0xCC),
156 qRgb(0x66, 0xFF, 0x99),
157 qRgb(0x66, 0xFF, 0x66),
158 qRgb(0x66, 0xFF, 0x33),
159 qRgb(0x66, 0xFF, 0x00),
160 qRgb(0x66, 0xCC, 0xFF),
161 qRgb(0x66, 0xCC, 0xCC),
162 qRgb(0x66, 0xCC, 0x99),
163 qRgb(0x66, 0xCC, 0x66),
164 qRgb(0x66, 0xCC, 0x33),
165 qRgb(0x66, 0xCC, 0x00),
166 qRgb(0x66, 0x99, 0xFF),
167 qRgb(0x66, 0x99, 0xCC),
168 qRgb(0x66, 0x99, 0x99),
169 qRgb(0x66, 0x99, 0x66),
170 qRgb(0x66, 0x99, 0x33),
171 qRgb(0x66, 0x99, 0x00),
172 qRgb(0x66, 0x66, 0xFF),
173 qRgb(0x66, 0x66, 0xCC),
174 qRgb(0x66, 0x66, 0x99),
175 qRgb(0x66, 0x66, 0x66),
176 qRgb(0x66, 0x66, 0x33),
177 qRgb(0x66, 0x66, 0x00),
178 qRgb(0x66, 0x33, 0xFF),
179 qRgb(0x66, 0x33, 0xCC),
180 qRgb(0x66, 0x33, 0x99),
181 qRgb(0x66, 0x33, 0x66),
182 qRgb(0x66, 0x33, 0x33),
183 qRgb(0x66, 0x33, 0x00),
184 qRgb(0x66, 0x00, 0xFF),
185 qRgb(0x66, 0x00, 0xCC),
186 qRgb(0x66, 0x00, 0x99),
187 qRgb(0x66, 0x00, 0x66),
188 qRgb(0x66, 0x00, 0x33),
189 qRgb(0x66, 0x00, 0x00),
190 qRgb(0x33, 0xFF, 0xFF),
191 qRgb(0x33, 0xFF, 0xCC),
192 qRgb(0x33, 0xFF, 0x99),
193 qRgb(0x33, 0xFF, 0x66),
194 qRgb(0x33, 0xFF, 0x33),
195 qRgb(0x33, 0xFF, 0x00),
196 qRgb(0x33, 0xCC, 0xFF),
197 qRgb(0x33, 0xCC, 0xCC),
198 qRgb(0x33, 0xCC, 0x99),
199 qRgb(0x33, 0xCC, 0x66),
200 qRgb(0x33, 0xCC, 0x33),
201 qRgb(0x33, 0xCC, 0x00),
202 qRgb(0x33, 0x99, 0xFF),
203 qRgb(0x33, 0x99, 0xCC),
204 qRgb(0x33, 0x99, 0x99),
205 qRgb(0x33, 0x99, 0x66),
206 qRgb(0x33, 0x99, 0x33),
207 qRgb(0x33, 0x99, 0x00),
208 qRgb(0x33, 0x66, 0xFF),
209 qRgb(0x33, 0x66, 0xCC),
210 qRgb(0x33, 0x66, 0x99),
211 qRgb(0x33, 0x66, 0x66),
212 qRgb(0x33, 0x66, 0x33),
213 qRgb(0x33, 0x66, 0x00),
214 qRgb(0x33, 0x33, 0xFF),
215 qRgb(0x33, 0x33, 0xCC),
216 qRgb(0x33, 0x33, 0x99),
217 qRgb(0x33, 0x33, 0x66),
218 qRgb(0x33, 0x33, 0x33),
219 qRgb(0x33, 0x33, 0x00),
220 qRgb(0x33, 0x00, 0xFF),
221 qRgb(0x33, 0x00, 0xCC),
222 qRgb(0x33, 0x00, 0x99),
223 qRgb(0x33, 0x00, 0x66),
224 qRgb(0x33, 0x00, 0x33),
225 qRgb(0x33, 0x00, 0x00),
226 qRgb(0x00, 0xFF, 0xFF),
227 qRgb(0x00, 0xFF, 0xCC),
228 qRgb(0x00, 0xFF, 0x99),
229 qRgb(0x00, 0xFF, 0x66),
230 qRgb(0x00, 0xFF, 0x33),
231 qRgb(0x00, 0xFF, 0x00),
232 qRgb(0x00, 0xCC, 0xFF),
233 qRgb(0x00, 0xCC, 0xCC),
234 qRgb(0x00, 0xCC, 0x99),
235 qRgb(0x00, 0xCC, 0x66),
236 qRgb(0x00, 0xCC, 0x33),
237 qRgb(0x00, 0xCC, 0x00),
238 qRgb(0x00, 0x99, 0xFF),
239 qRgb(0x00, 0x99, 0xCC),
240 qRgb(0x00, 0x99, 0x99),
241 qRgb(0x00, 0x99, 0x66),
242 qRgb(0x00, 0x99, 0x33),
243 qRgb(0x00, 0x99, 0x00),
244 qRgb(0x00, 0x66, 0xFF),
245 qRgb(0x00, 0x66, 0xCC),
246 qRgb(0x00, 0x66, 0x99),
247 qRgb(0x00, 0x66, 0x66),
248 qRgb(0x00, 0x66, 0x33),
249 qRgb(0x00, 0x66, 0x00),
250 qRgb(0x00, 0x33, 0xFF),
251 qRgb(0x00, 0x33, 0xCC),
252 qRgb(0x00, 0x33, 0x99),
253 qRgb(0x00, 0x33, 0x66),
254 qRgb(0x00, 0x33, 0x33),
255 qRgb(0x00, 0x33, 0x00),
256 qRgb(0x00, 0x00, 0xFF),
257 qRgb(0x00, 0x00, 0xCC),
258 qRgb(0x00, 0x00, 0x99),
259 qRgb(0x00, 0x00, 0x66),
260 qRgb(0x00, 0x00, 0x33),
261 qRgb(0xEE, 0x00, 0x00),
262 qRgb(0xDD, 0x00, 0x00),
263 qRgb(0xBB, 0x00, 0x00),
264 qRgb(0xAA, 0x00, 0x00),
265 qRgb(0x88, 0x00, 0x00),
266 qRgb(0x77, 0x00, 0x00),
267 qRgb(0x55, 0x00, 0x00),
268 qRgb(0x44, 0x00, 0x00),
269 qRgb(0x22, 0x00, 0x00),
270 qRgb(0x11, 0x00, 0x00),
271 qRgb(0x00, 0xEE, 0x00),
272 qRgb(0x00, 0xDD, 0x00),
273 qRgb(0x00, 0xBB, 0x00),
274 qRgb(0x00, 0xAA, 0x00),
275 qRgb(0x00, 0x88, 0x00),
276 qRgb(0x00, 0x77, 0x00),
277 qRgb(0x00, 0x55, 0x00),
278 qRgb(0x00, 0x44, 0x00),
279 qRgb(0x00, 0x22, 0x00),
280 qRgb(0x00, 0x11, 0x00),
281 qRgb(0x00, 0x00, 0xEE),
282 qRgb(0x00, 0x00, 0xDD),
283 qRgb(0x00, 0x00, 0xBB),
284 qRgb(0x00, 0x00, 0xAA),
285 qRgb(0x00, 0x00, 0x88),
286 qRgb(0x00, 0x00, 0x77),
287 qRgb(0x00, 0x00, 0x55),
288 qRgb(0x00, 0x00, 0x44),
289 qRgb(0x00, 0x00, 0x22),
290 qRgb(0x00, 0x00, 0x11),
291 qRgb(0xEE, 0xEE, 0xEE),
292 qRgb(0xDD, 0xDD, 0xDD),
293 qRgb(0xBB, 0xBB, 0xBB),
294 qRgb(0xAA, 0xAA, 0xAA),
295 qRgb(0x88, 0x88, 0x88),
296 qRgb(0x77, 0x77, 0x77),
297 qRgb(0x55, 0x55, 0x55),
298 qRgb(0x44, 0x44, 0x44),
299 qRgb(0x22, 0x22, 0x22),
300 qRgb(0x11, 0x11, 0x11),
301 qRgb(0x00, 0x00, 0x00)
321 return u ==
r && ((u % 16 == 0) || (
r >= 16 && (u & (u - 1)) == 0));
326 return header.ostype != 0 && (bound == 0
349 if (ostype.
size() != 4)
356 const bool portable = iconNumber < 7;
358 if (!portable && iconNumber < 10)
396 if (isPNG || isJP2) {
401 if (oldPos !=
icon.dataOffset && !
device->seek(oldPos))
411 const QString ptrn =
QStringLiteral(
"^(?<junk>[a-z|A-Z]{0,4})(?<group>[a-z|A-Z]{1})(?<depth>[\\d]{0,2})(?<mask>[#mk]{0,2})$");
414 if (!
match.hasMatch()) {
415 qWarning(
"parseIconEntryInfo(): Failed, OSType doesn't match: \"%s\"",
qPrintable(ostype));
422 if (!
group.isEmpty())
429 if (!
depth.isEmpty()) {
451 }
else if (doubleSize) {
458 const bool doubleSize =
icon.dataLength == 192 * bytespp * 2;
467 switch (
icon.group) {
481 qWarning(
"parseIconEntryInfo(): Failed, 32bit icon from an unknown group. OSType: \"%s\"",
487 if (
icon.width == 0 ||
icon.width > 4096)
497 qWarning(
"readMask(): Failed, unusual bit depth: %u OSType: \"%s\"",
516 if (pixel % (8 /
mask.depth) == 0)
520 const quint8 alpha = isMono ? (((
byte >> 7) & 0x01) * 255) : byte;
525 stream.device()->seek(oldPos);
529template <ICNSEntry::Depth depth>
543 img.setColorTable(colortable);
548 if (pixel % (8 /
depth) == 0)
553 cindex = (
byte >> 7) & 0x01;
557 cindex = (
byte >> 4) & 0x0F;
564 img.setPixel(
x,
y, cindex);
591 if (qFromBigEndian<quint32>(*bytes.
constData()) == 0)
593 for (
quint8 colorNRun = 0; colorNRun < 3; colorNRun++) {
596 while (pixel < estPxsNum && !
stream.atEnd()) {
599 const bool bitIsClear = (
byte & 0x80) == 0;
601 quint8 runLength = bitIsClear ? ((0xFF & byte) + 1) : ((0xFF & byte) - 125);
606 for (
quint8 i = 0;
i < runLength && pixel < estPxsNum;
i++) {
611 if (pixel %
icon.height == 0)
627 m_currentIconIndex(0), m_state(ScanNotScanned)
634 qWarning(
"QICNSHandler::canRead() called without a readable device");
640 qWarning(
"QICNSHandler::canRead() called on a sequential device");
654 if (m_state != ScanError) {
665 if (!ensureScanned() || m_currentIconIndex >= m_icons.
size()) {
666 qWarning(
"QICNSHandler::read(): The device wasn't parsed properly!");
676 switch (
icon.dataFormat) {
681 switch (
icon.depth) {
695 qWarning(
"QICNSHandler::read(): Failed, unsupported icon bit depth: %u, OSType: \"%s\"",
715 qWarning(
"QICNSHandler::read(): Failed, compressed format \"%s\" is not supported " \
716 "by your Qt library or this file is corrupt. OSType: \"%s\"",
721 return !
img.isNull();
739 const int oldSize = (minSize < 16) ? 16 : minSize;
744 while (pow < 10 && (
size >>= 1))
746 const int newSize = 1 << pow;
749 if (newSize != oldSize ||
qMax(
image.width(),
image.height()) != minSize)
758 iconEntry.
ostype = ostype;
772 stream << fileHeader << tocHeader << iconEntry << iconEntry;
790 if (
icon.variant != 0)
801 if (!ensureScanned())
804 return m_icons.
size();
812 m_currentIconIndex = imageNumber;
821bool QICNSHandler::ensureScanned()
const
823 if (m_state == ScanNotScanned) {
825 that->m_state = that->scanDevice() ? ScanSuccess : ScanError;
828 return m_state == ScanSuccess;
837 entry.dataOffset = imgDataOffset;
852bool QICNSHandler::scanDevice()
854 if (m_state == ScanSuccess)
863 bool scanIsIncomplete =
false;
873 qWarning(
"QICNSHandler::scanDevice(): Failed, bad header at pos %s. OSType \"%s\", length %u",
879 const qint64 nextBlockOffset = blockDataOffset + blockDataLength;
881 switch (blockHeader.ostype) {
886 stream.skipRawData(blockDataLength);
889 filelength = blockHeader.length;
891 qWarning(
"QICNSHandler::scanDevice(): Failed, file is incomplete.");
898 stream.skipRawData(blockDataLength);
921 if (
device()->
pos() != nextBlockOffset) {
924 qWarning(
"Scan of the icon variant container (\"%s\") failed at pos %s.\n" \
925 "Reason: Scan didn't reach the end of this container's block, " \
926 "delta: %s bytes. This file may be corrupted.",
930 if (!
device()->seek(nextBlockOffset))
939 stream.skipRawData(blockDataLength);
943 qint64 imgDataOffset = blockDataOffset + blockHeader.length;
949 qWarning(
"QICNSHandler::scanDevice(): Warning! Table of contents contains a bad " \
950 "entry! Stop at device pos: %s bytes. This file may be corrupted.",
952 if (!
device()->seek(nextBlockOffset))
956 if (!addEntry(tocEntry, imgDataOffset))
958 imgDataOffset += tocEntry.
length;
960 if (imgDataOffset == filelength)
964 scanIsIncomplete =
true;
969 if (scanIsIncomplete) {
973 for (
int i = 0;
i < m_icons.
size() && !exists;
i++)
975 for (
int i = 0;
i < m_masks.
size() && !exists;
i++)
977 if (!exists && !addEntry(blockHeader, blockDataOffset))
979 }
else if (!addEntry(blockHeader, blockDataOffset)) {
982 stream.skipRawData(blockDataLength);
986 return (m_icons.
size() > 0);
993 for (
int i = 0;
i < m_masks.
size();
i++) {
IOBluetoothDevice * device
\inmodule QtCore \reentrant
qsizetype size() const noexcept
Returns the number of bytes in this byte array.
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
bool isEmpty() const noexcept
Returns true if the byte array has size 0; otherwise returns false.
static QByteArray number(int, int base=10)
Returns a byte-array representing the whole number n as text.
\inmodule QtCore\reentrant
int imageCount() const override
For image formats that support animation, this function returns the number of images in the animation...
bool write(const QImage &image) override
Writes the image image to the assigned device.
bool read(QImage *image) override
Read an image from the device, and stores it in image.
bool canRead() const override
Returns true if an image can be read from the device (i.e., the image format is supported,...
bool supportsOption(ImageOption option) const override
Returns true if the QImageIOHandler supports the option option; otherwise returns false.
QVariant option(ImageOption option) const override
Returns the value assigned to option as a QVariant.
bool jumpToImage(int imageNumber) override
For image formats that support animation, this function jumps to the image whose sequence number is i...
bool jumpToNextImage() override
For image formats that support animation, this function jumps to the next image.
\inmodule QtCore \reentrant
virtual qint64 size() const
For open random-access devices, this function returns the size of the device.
virtual qint64 pos() const
For random-access devices, this function returns the position that data is written to or read from.
virtual bool isSequential() const
Returns true if this device is sequential; otherwise returns false.
bool isReadable() const
Returns true if data can be read from the device; otherwise returns false.
qint64 peek(char *data, qint64 maxlen)
bool isWritable() const
Returns true if data can be written to the device; otherwise returns false.
ImageOption
This enum describes the different options supported by QImageIOHandler.
static bool allocateImage(QSize size, QImage::Format format, QImage *image)
QIODevice * device() const
Returns the device currently assigned to the QImageIOHandler.
void setFormat(const QByteArray &format)
Sets the format of the QImageIOHandler to format.
Format
The following image formats are available in Qt.
static QImage fromData(QByteArrayView data, const char *format=nullptr)
qsizetype size() const noexcept
bool isEmpty() const noexcept
const_reference at(qsizetype i) const noexcept
\inmodule QtCore \reentrant
\inmodule QtCore \reentrant
QRegularExpressionMatch match(const QString &subject, qsizetype offset=0, MatchType matchType=NormalMatch, MatchOptions matchOptions=NoMatchOption) const
Attempts to match the regular expression against the given subject string, starting at the position o...
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
qsizetype length() const
Returns the number of characters in this string.
Combined button and popup list for selecting options.
#define Q_STATIC_ASSERT(Condition)
#define QByteArrayLiteral(str)
static QString header(const QString &name)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
constexpr T qToBigEndian(T source)
constexpr T qFromBigEndian(T source)
qfloat16 qSqrt(qfloat16 f)
int qRound(qfloat16 d) noexcept
static bool isPowOf2OrDividesBy16(quint32 u, qreal r)
static bool isBlockHeaderValid(const ICNSBlockHeader &header, quint64 bound=0)
static QT_BEGIN_NAMESPACE const quint8 ICNSBlockHeaderSize
static QImage readLowDepthIcon(const ICNSEntry &icon, QDataStream &stream)
static bool isMaskSuitable(const ICNSEntry &mask, const ICNSEntry &icon, ICNSEntry::Depth target)
static const QRgb ICNSColorTableMono[]
static bool isIconCompressed(const ICNSEntry &icon)
static QList< QRgb > getColorTable(ICNSEntry::Depth depth)
static QByteArray nameForCompressedIcon(quint8 iconNumber)
static bool parseIconEntryData(ICNSEntry &icon, QIODevice *device)
static bool parseIconEntryInfo(ICNSEntry &icon)
static const QRgb ICNSColorTable4bit[]
static QImage read32bitIcon(const ICNSEntry &icon, QDataStream &stream)
static quint32 nameToOSType(const QByteArray &ostype)
static QByteArray nameFromOSType(quint32 ostype)
static QImage readMask(const ICNSEntry &mask, QDataStream &stream)
static QDataStream & operator>>(QDataStream &in, ICNSBlockHeader &p)
static const QRgb ICNSColorTable8bit[]
static QDataStream & operator<<(QDataStream &out, const ICNSBlockHeader &p)
constexpr const T & qMin(const T &a, const T &b)
constexpr const T & qBound(const T &min, const T &val, const T &max)
constexpr const T & qMax(const T &a, const T &b)
GLboolean GLboolean GLboolean b
GLint GLint GLint GLint GLint x
[0]
GLint GLenum GLsizei GLsizei GLsizei depth
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLenum GLsizei count
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
GLint GLsizei GLsizei GLenum format
GLfloat GLfloat GLfloat alpha
GLenum GLenum GLsizei void * table
QT_BEGIN_NAMESPACE typedef unsigned int QRgb
constexpr QRgb qRgb(int r, int g, int b)
constexpr int qRed(QRgb rgb)
constexpr int qGreen(QRgb rgb)
constexpr int qBlue(QRgb rgb)
#define qPrintable(string)
#define QStringLiteral(str)
static bool match(const uchar *found, uint foundLen, const char *target, uint targetLen)
static const uchar magic[MagicLength]
unsigned long long quint64
static size_t imageDataSize(const xcb_image_t *image)
QTextStream out(stdout)
[7]