|
Celeritas 0.7.0-dev.194+develop.0df4cab59
|
Write a 2D array of colors as a PNG file. More...
#include <ImageWriter.hh>
Classes | |
| struct | Impl |
Public Types | |
Type aliases | |
| using | SpanColor = Span< Color > |
Public Member Functions | |
| ImageWriter (std::string const &filename, Size2 height_width) | |
| Construct with a filename and dimensions. | |
| ~ImageWriter () | |
| Close on destruction. | |
| void | operator() (Span< Color const >) |
| Write a row. | |
| void | close () |
| Close the file early so that exceptions can be caught. | |
| operator bool () const | |
| Whether the output is available for writing. | |
Write a 2D array of colors as a PNG file.
Each row is written progressively. All rows must be written. Currently alpha values are ignored due to my poor understanding of libpng.
Construct with a filename and dimensions.
Dimensions are row-major like other C++ arrays.