1/*
2 This file is part of the KDE project
3 SPDX-FileCopyrightText: 2023 Ernest Gupik <ernestgupik@wp.pl>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef KIMG_QOI_P_H
9#define KIMG_QOI_P_H
10
11#include <QImageIOPlugin>
12
13class QOIHandler : public QImageIOHandler
14{
15public:
16 QOIHandler();
17
18 bool canRead() const override;
19 bool read(QImage *image) override;
20 bool write(const QImage &image) override;
21
22 bool supportsOption(QImageIOHandler::ImageOption option) const override;
23 QVariant option(QImageIOHandler::ImageOption option) const override;
24
25 static bool canRead(QIODevice *device);
26};
27
28class QOIPlugin : public QImageIOPlugin
29{
30 Q_OBJECT
31 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "qoi.json")
32
33public:
34 Capabilities capabilities(QIODevice *device, const QByteArray &format) const override;
35 QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const override;
36};
37
38#endif // KIMG_QOI_P_H
39

source code of kimageformats/src/imageformats/qoi_p.h