Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qjp2handler_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// Copyright (C) 2016 Petroules Corporation.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4// Qt-Security score:significant reason:default
5
6
7#ifndef QJP2HANDLER_H
8#define QJP2HANDLER_H
9
10#include <QtCore/qscopedpointer.h>
11#include <QtGui/qimageiohandler.h>
12
14
15class QImage;
16class QByteArray;
17class QIODevice;
18class QVariant;
19class QJp2HandlerPrivate;
20
22{
23public:
25 ~QJp2Handler();
26 static bool canRead(QIODevice *iod, QByteArray *subType);
27 bool canRead() const override;
28 bool read(QImage *image) override;
29 bool write(const QImage &image) override;
30 QVariant option(ImageOption option) const override;
31 void setOption(ImageOption option, const QVariant &value) override;
32 bool supportsOption(ImageOption option) const override;
33
34private:
37};
38
39QT_END_NAMESPACE
40
41#endif // QJP2HANDLER_P_H
ImageOption
This enum describes the different options supported by QImageIOHandler.
The QJp2Handler class provides support for reading and writing JPEG 2000 image files with the Qt plug...
~QJp2Handler()
Destructor for QJp2Handler.
QJp2Handler()
Constructs an instance of QJp2Handler.
static bool canRead(QIODevice *iod, QByteArray *subType)
Verifies if some values (magic bytes) are set as expected in the header of the file.
void setOption(ImageOption option, const QVariant &value) override
The JPEG 2000 handler supports two options.
bool write(const QImage &image) override
\reimp
bool read(QImage *image) override
\reimp
bool supportsOption(ImageOption option) const override
This function will return true if option is set to either QImageIOHandler::Quality or QImageIOHandler...
QVariant option(ImageOption option) const override
Get the value associated with option.
bool canRead() const override
\reimp
QImageIOHandler * create(QIODevice *device, const QByteArray &format=QByteArray()) const override
Creates and returns a QImageIOHandler subclass, with device and format set.
Definition main.cpp:46
Combined button and popup list for selecting options.