PCX: added options support

- Added support for ```Size``` and ```Format``` options and slightly improved format detection from canRead().
- Added PCXHEADER::isValid() method to consolidate header consistency checks in one place.
This commit is contained in:
Mirco Miranda
2024-08-17 06:40:29 +00:00
parent 0590c6b49d
commit d02dcb064b
2 changed files with 141 additions and 36 deletions

View File

@@ -9,7 +9,9 @@
#define KIMG_PCX_P_H
#include <QImageIOPlugin>
#include <QScopedPointer>
class PCXHandlerPrivate;
class PCXHandler : public QImageIOHandler
{
public:
@@ -19,7 +21,13 @@ public:
bool read(QImage *image) override;
bool write(const QImage &image) override;
bool supportsOption(QImageIOHandler::ImageOption option) const override;
QVariant option(QImageIOHandler::ImageOption option) const override;
static bool canRead(QIODevice *device);
private:
const QScopedPointer<PCXHandlerPrivate> d;
};
class PCXPlugin : public QImageIOPlugin