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
5#ifndef QJP2HANDLER_H
6#define QJP2HANDLER_H
7
8#include <QtCore/qscopedpointer.h>
9#include <QtGui/qimageiohandler.h>
10
12
13class QImage;
14class QByteArray;
15class QIODevice;
16class QVariant;
17class QJp2HandlerPrivate;
18
20{
21public:
23 ~QJp2Handler();
24 static bool canRead(QIODevice *iod, QByteArray *subType);
25 bool canRead() const override;
26 bool read(QImage *image) override;
27 bool write(const QImage &image) override;
28 QVariant option(ImageOption option) const override;
29 void setOption(ImageOption option, const QVariant &value) override;
30 bool supportsOption(ImageOption option) const override;
31
32private:
35};
36
37QT_END_NAMESPACE
38
39#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:44