X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;ds=sidebyside;f=gui%2Fapisurface.h;h=ed6debe6ec2e662be64ddaee6d3098f961d0c6c8;hb=2a5696befce6be00fa655b751af5ce2924ea45ae;hp=9c7115ec2b4696844157be6ec757585758d82013;hpb=b25c4b9fccc76976d633bc5b183a84553ab01998;p=apitrace diff --git a/gui/apisurface.h b/gui/apisurface.h index 9c7115e..ed6debe 100644 --- a/gui/apisurface.h +++ b/gui/apisurface.h @@ -5,6 +5,10 @@ #include #include +namespace image { + class Image; +} + class ApiSurface { public: @@ -13,23 +17,31 @@ public: QSize size() const; void setSize(const QSize &size); - int numChannels() const; - void setNumChannels(int numChannels); - int depth() const; void setDepth(int depth); + QString formatName() const; + void setFormatName(const QString &str); + void contentsFromBase64(const QByteArray &base64); - QImage image() const; + QByteArray base64Data() const; QImage thumb() const; + static image::Image *imageFromBase64(const QByteArray &data); + static QImage qimageFromRawImage(const image::Image *img, + float lowerValue = 0.0f, + float upperValue = 1.0f, + bool opaque = false, + bool alpha = false); + private: QSize m_size; int m_numChannels; - QImage m_image; + QByteArray m_base64Data; QImage m_thumb; int m_depth; + QString m_formatName; };