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
38private:
39 const QScopedPointer<IFFHandlerPrivate> d;
40};
41
42class IFFPlugin : public QImageIOPlugin
43{
44 Q_OBJECT
45 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "iff.json")
46
47public:
48 Capabilities capabilities(QIODevice *device, const QByteArray &format) const override;
49 QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const override;
50};
51
52#endif // KIMG_IFF_P_H
53

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