1 | /* |
2 | kimgio module for SGI images |
3 | SPDX-FileCopyrightText: 2004 Melchior FRANZ <mfranz@kde.org> |
4 | |
5 | SPDX-License-Identifier: LGPL-2.0-or-later |
6 | */ |
7 | |
8 | #ifndef KIMG_RGB_P_H |
9 | #define KIMG_RGB_P_H |
10 | |
11 | #include <QImageIOPlugin> |
12 | |
13 | class RGBHandler : public QImageIOHandler |
14 | { |
15 | public: |
16 | RGBHandler(); |
17 | |
18 | bool canRead() const override; |
19 | bool read(QImage *image) override; |
20 | bool write(const QImage &image) override; |
21 | |
22 | static bool canRead(QIODevice *device); |
23 | }; |
24 | |
25 | class RGBPlugin : public QImageIOPlugin |
26 | { |
27 | Q_OBJECT |
28 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "rgb.json" ) |
29 | |
30 | public: |
31 | Capabilities capabilities(QIODevice *device, const QByteArray &format) const override; |
32 | QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const override; |
33 | }; |
34 | |
35 | #endif // KIMG_RGB_P_H |
36 | |