summaryrefslogtreecommitdiffstats
path: root/tests/pngxx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pngxx.cpp')
-rw-r--r--tests/pngxx.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/pngxx.cpp b/tests/pngxx.cpp
index 27fe89c..731f470 100644
--- a/tests/pngxx.cpp
+++ b/tests/pngxx.cpp
@@ -94,10 +94,13 @@ main()
}
}
+ // Write the image to PNG
Progress progress = writer.write_async();
std::cout << "Writing PNG file: " << progress << std::endl;
}
+ // Read the image back from PNG
+
std::ifstream ifstr("dimensionxx1.png", std::ios::binary);
PNG_Reader reader(ifstr);
@@ -105,6 +108,8 @@ main()
std::cout << "Reading PNG file: " << iprogress << std::endl;
Canvas canvas = PNG_Reader::finish(iprogress);
+ // And write it again
+
std::ofstream ofstr("dimensionxx2.png", std::ios::binary);
PNG_Writer writer(canvas, ofstr);