Browse Source

updated readme

master
Joshua Moerman 12 years ago
parent
commit
4c01ccf743
  1. 20
      README.md

20
README.md

@ -7,7 +7,7 @@ Some time ago I had a project where I rendered something to a high quality buffe
Features Features
-------- --------
* Output streams for bmp and png image files * Output streams for bmp, png and jpg image files
* Grayscale and color * Grayscale and color
* Low memory usage (because it streams) * Low memory usage (because it streams)
* Easy to use * Easy to use
@ -18,10 +18,22 @@ Uasge
png::gray_ostream image(1024, 768, "test.png"); png::gray_ostream image(1024, 768, "test.png");
for(int y = 0; y < 768; ++y){ for(int y = 0; y < 768; ++y){
for(int x = 0; x < 1024; ++x){ for(int x = 0; x < 1024; ++x){
image << png::gray_ostream::pixel(some_generation(x,y)); image << png::gray_ostream::pixel(some_generator(x,y));
} }
} }
// done, image is automatically saved (wtih RAII) // done, image is automatically saved (with RAII)
``` ```
There are more examples in the main.cpp file. There are more examples in the main.cpp file.
Dependencies
------------
For the png format libpng is required. For the jpg format libjpeg of libjpeg-turbo is required. The bmp format does not depend on anything, so you can output images without other libraries :D.
TODO
----
* Make output iterators
* Add alpha support (where possible)
* Some interface for parameters (eg. jpg quality)
* Add appropriate license
* Really make it a library (ie. restructure directories)