From 21423a44d6e3091addc00c1b0769336e1f154d4e Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 8 May 2016 19:50:45 +0200 Subject: Implement basic PPM writing function `write_ppm` generates a PPM image using a given generation function. Output is written using `std::ofstream`. The library is intended to become a straight forward way to test out various visualizations. --- test.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test.cc (limited to 'test.cc') diff --git a/test.cc b/test.cc new file mode 100644 index 0000000..36f637d --- /dev/null +++ b/test.cc @@ -0,0 +1,12 @@ +#include + +int main(int, char*[]) { + imgen::write_ppm( + "test.ppm", + 500, + 500, + [](std::size_t x, std::size_t y) -> imgen::color { + return imgen::color(255, x % 255, y % 255); + } + ); +} -- cgit v1.2.3