summaryrefslogtreecommitdiffstats
path: root/tests/pngxx.cpp
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-07-08 17:12:02 +0000
committerTavian Barnes <tavianator@gmail.com>2009-07-08 17:12:02 +0000
commitbff7f2b3b440c30d0d6eb692576af57ef42edd1b (patch)
tree0ba45051db1ee7b7808339cfb587f8f76d8c7c5c /tests/pngxx.cpp
parent14c9cd86e1b7c6ff27c5000d72721c54a718daac (diff)
downloaddimension-bff7f2b3b440c30d0d6eb692576af57ef42edd1b.tar.xz
Comments and style adjustments, and a couple fixes.
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);