]> git.cworth.org Git - apitrace/blobdiff - gui/apisurface.h
Rescale the image pixels using the full precision.
[apitrace] / gui / apisurface.h
index 9f000014f656d7e08b9056a0a317e03191e5d028..ed6debe6ec2e662be64ddaee6d3098f961d0c6c8 100644 (file)
@@ -5,6 +5,10 @@
 #include <QSize>
 #include <QString>
 
+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;