1/*
2 This file is part of the KDE project
3 SPDX-FileCopyrightText: 2025 Mirco Miranda <mircomir@outlook.com>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef KIMG_IFF_P_H
9#define KIMG_IFF_P_H
10
11#include <QImageIOPlugin>
12#include <QScopedPointer>
13
14class IFFHandlerPrivate;
15class IFFHandler : public QImageIOHandler
16{
17public:
18 IFFHandler();
19
20 bool canRead() const override;
21 bool read(QImage *image) override;
22
23 bool supportsOption(QImageIOHandler::ImageOption option) const override;
24 QVariant option(QImageIOHandler::ImageOption option) const override;
25
26 bool jumpToNextImage() override;
27 bool jumpToImage(int imageNumber) override;
28 int imageCount() const override;
29 int currentImageNumber() const override;
30
31 static bool canRead(QIODevice *device);
32
33private:
34 bool readStandardImage(QImage *image);
35
36 bool readMayaImage(QImage *image);
37
38 bool readCDIImage(QImage *image);
39
40 bool readRGFXImage(QImage *image);
41
42private:
43 const QScopedPointer<IFFHandlerPrivate> d;
44};
45
46class IFFPlugin : public QImageIOPlugin
47{
48 Q_OBJECT
49 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "iff.json")
50
51public:
52 Capabilities capabilities(QIODevice *device, const QByteArray &format) const override;
53 QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const override;
54};
55
56#endif // KIMG_IFF_P_H
57

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