Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qwebphandler_p.h
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
6
#
ifndef
QWEBPHANDLER_P_H
7
#
define
QWEBPHANDLER_P_H
8
9
#
include
<
QtGui
/
qcolor
.
h
>
10
#
include
<
QtGui
/
qcolorspace
.
h
>
11
#
include
<
QtGui
/
qimage
.
h
>
12
#
include
<
QtGui
/
qimageiohandler
.
h
>
13
#
include
<
QtCore
/
qbytearray
.
h
>
14
#
include
<
QtCore
/
qsize
.
h
>
15
16
#
include
"webp/decode.h"
17
#
include
"webp/demux.h"
18
19
QT_BEGIN_NAMESPACE
20
21
class
QWebpHandler :
public
QImageIOHandler
22
{
23
public
:
24
QWebpHandler();
25
~QWebpHandler();
26
27
public
:
28
bool
canRead()
const
override;
29
bool
read(QImage *image) override;
30
31
static
bool
canRead(QIODevice *device);
32
33
bool
write(
const
QImage &image) override;
34
QVariant option(ImageOption option)
const
override;
35
void
setOption(ImageOption option,
const
QVariant &value) override;
36
bool
supportsOption(ImageOption option)
const
override;
37
38
int
imageCount()
const
override;
39
int
currentImageNumber()
const
override;
40
QRect currentImageRect()
const
override;
41
int
loopCount()
const
override;
42
int
nextImageDelay()
const
override;
43
44
private
:
45
bool
ensureScanned()
const
;
46
bool
ensureDemuxer();
47
48
private
:
49
enum
ScanState {
50
ScanError = -1,
51
ScanNotScanned = 0,
52
ScanSuccess = 1,
53
};
54
55
int
m_quality;
56
mutable
ScanState m_scanState;
57
WebPBitstreamFeatures m_features;
58
uint32_t m_formatFlags;
59
int
m_loop;
60
int
m_frameCount;
61
QColor m_bgColor;
62
QByteArray m_rawData;
63
WebPDemuxer *m_demuxer;
64
WebPIterator m_iter;
65
QColorSpace m_colorSpace;
66
QImage *m_composited;
// For animation frames composition
67
};
68
69
QT_END_NAMESPACE
70
71
#
endif
// WEBPHANDLER_H
QByteArray::FromBase64Result
\inmodule QtCore
Definition
qbytearray.h:824
QWebpPlugin
Definition
main.cpp:19
QWebpPlugin::create
QImageIOHandler * create(QIODevice *device, const QByteArray &format=QByteArray()) const override
Creates and returns a QImageIOHandler subclass, with device and format set.
Definition
main.cpp:47
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtimageformats
src
plugins
imageformats
webp
qwebphandler_p.h
Generated on
for Qt by
1.18.0