mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2026-07-23 16:31:01 -04:00
RGB: added options support
- Added support for `Size` and `Format` options and slightly improved format detection from canRead(). - Removed conversion to ARGB32 on load (improved performace with RGBA images). - Added result checks on writing. With this MR, all plugins have minimal support for options.
This commit is contained in:
committed by
Albert Astals Cid
parent
d02dcb064b
commit
2405a09e36
@@ -9,7 +9,9 @@
|
||||
#define KIMG_RGB_P_H
|
||||
|
||||
#include <QImageIOPlugin>
|
||||
#include <QScopedPointer>
|
||||
|
||||
class SGIImagePrivate;
|
||||
class RGBHandler : 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:
|
||||
QScopedPointer<SGIImagePrivate> d;
|
||||
};
|
||||
|
||||
class RGBPlugin : public QImageIOPlugin
|
||||
|
||||
Reference in New Issue
Block a user