]> git.cworth.org Git - apitrace/blobdiff - image.hpp
Remove spurious tag in snapdiff output.
[apitrace] / image.hpp
index 92749c6752d511e2b23c08b874ac39c3bd03321c..5a9704eb821b9fba736e9c00233b1b0996df2aea 100644 (file)
--- a/image.hpp
+++ b/image.hpp
@@ -59,10 +59,29 @@ public:
         delete [] pixels;
     }
 
-    void writeBMP(const char *filename) const;
+    inline unsigned char *start(void) {
+        return flipped ? pixels + (height - 1)*width*4 : pixels;
+    }
+
+    inline unsigned char *end(void) {
+        return flipped ? pixels - width*4 : pixels + height*width*4;
+    }
+
+    inline signed stride(void) const {
+        return flipped ? -width*4 : width*4;
+    }
+
+    bool writeBMP(const char *filename) const;
+    bool writePNG(const char *filename) const;
+
+    double compare(Image &ref);
 };
 
 
+Image *
+readPNG(const char *filename);
+
+
 } /* namespace Image */