|
| void | initialize (std::size_t output_image_width, std::size_t output_image_height) |
| | initialized the writing process. Has to be called before the first write() call of a given image. More...
|
| |
| void | release () |
| | release the writing process. Has to be called when an image has been fully written. More...
|
| |
| int | write (const container_type &data) |
| | write function. This function write the data within the output file after the previous one. When last is set to true, the output file is closed. More...
|
| |
|
| | PngWriter () |
| |
| | PngWriter (std::string output_filename, std::size_t output_image_width, std::size_t output_image_height) |
| |
| virtual | ~PngWriter () |
| |
|
| const std::string & | get_output_filename () const |
| | return the output file name. More...
|
| |
| void | set_output_filename (const std::string &output_filename) |
| | set the output file name. More...
|
| |
template<class Container2d, typename T, std::size_t Nb_components>
class slip::PngWriter< Container2d, T, Nb_components >
PngWriter is the png image writer.
- Version
- Fluex 1.0
- Date
- 2013/04/22
- Author
- Denis Arrivault <denis.arrivault_AT_inria.fr>
- Parameters
-
| Container2d | is the type of the containers that will be written in the png file. It should be a 2 dimensional containers with [] operator, width() and height() methods defined. |
| T | the type of the container data. |
| Nb_components | the number of image components (3 for a color image or 1 for a gray scale image). |
- Note
- The color space is RGB for color image and GRAYSCALE for grayscale images.
- Examples:
- netcdf_file_io.cpp.
Definition at line 43 of file PngWriter.hpp.
template<class Container2d , typename T , std::size_t Nb_components>
write function. This function write the data within the output file after the previous one. When last is set to true, the output file is closed.
- Parameters
-
| data | is the image container to save. Warning, the container should be a 2d container with [] operator, width() and height() methods defined. |
- Returns
- false if the file has been completely filled.
- Note
- Whatever the type of the data in the container, a static_cast is done for getting unsigned char. Be sure that the dynamic of the data is conform with this cast.
-
The color space is RGB for color image and GRAYSCALE for grayscale images.
Implements slip::ContainerWriter< Container2d, T >.
Definition at line 235 of file PngWriter.hpp.