]> git.cworth.org Git - apitrace/blobdiff - image/image_png.cpp
image: Move helpers to respective modules.
[apitrace] / image / image_png.cpp
index 0a413e1c6bbf25b8c23017c8f4c303359f2afaf7..357a78e9a38c83a744668524339d54db7f50b123 100644 (file)
@@ -123,6 +123,17 @@ no_png:
 }
 
 
+bool
+Image::writePNG(const char *filename) const
+{
+    std::ofstream os(filename, std::ofstream::binary);
+    if (!os) {
+        return false;
+    }
+    return writePNG(os);
+}
+
+
 Image *
 readPNG(const char *filename)
 {