updated readme
This commit is contained in:
parent
446dc14daf
commit
cd1fbab4e9
1 changed files with 17 additions and 5 deletions
20
README.md
20
README.md
|
@ -7,21 +7,33 @@ Some time ago I had a project where I rendered something to a high quality buffe
|
|||
|
||||
Features
|
||||
--------
|
||||
* Output streams for bmp and png image files
|
||||
* Output streams for bmp, png and jpg image files
|
||||
* Grayscale and color
|
||||
* Low memory usage (because it streams)
|
||||
* Easy to use
|
||||
|
||||
Uasge
|
||||
Usage
|
||||
-----
|
||||
```C++
|
||||
png::gray_ostream image(1024, 768, "test.png");
|
||||
for(int y = 0; y < 768; ++y){
|
||||
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.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
For the png format libpng is required. For the jpg format libjpeg or 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)
|
||||
|
|
Reference in a new issue