X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;ds=sidebyside;f=gui%2Fapisurface.h;h=ed6debe6ec2e662be64ddaee6d3098f961d0c6c8;hb=bd9811ff579a0482bfd7d40b1149bcef40ad3d71;hp=9f000014f656d7e08b9056a0a317e03191e5d028;hpb=5ec1deb2d9238b6636e73b5a7cd67a8a319c79aa;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;