X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=gui%2Fapisurface.h;h=ed6debe6ec2e662be64ddaee6d3098f961d0c6c8;hb=cfb8a74451e3a4063b2e7638cfbb15ad6b533600;hp=9f000014f656d7e08b9056a0a317e03191e5d028;hpb=77373c35010d89e5ab3f030e4c60f8f6e3fdbe82;p=apitrace diff --git a/gui/apisurface.h b/gui/apisurface.h index 9f00001..ed6debe 100644 --- a/gui/apisurface.h +++ b/gui/apisurface.h @@ -5,6 +5,10 @@ #include #include +namespace image { + class Image; +} + class ApiSurface { public: @@ -21,13 +25,20 @@ public: 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;