Write blitz arrays into a desired image format.
More...
#include <BlitzImageWriter.hh>
|
static void | writePGM (const blitz::Array< unsigned char, 2 > &data, const std::string &fileName, int format=2) |
| Write a .pgm file (portable gray map) from a blitz array Image is written as ASCII data or raw binary depending on the format parameter. More...
|
|
static int | writePNG (const ImageAccessWrapper &data, const std::string &fileName, int compfac=9) |
| Write a .png file from a blitz array. More...
|
|
static void | writePPM (const ImageAccessWrapper &data, const std::string &fileName, int format=3) |
| Write a .ppm file (portable pix map) from a blitz array Image is written as ASCII data or raw binary depending on the format parameter. More...
|
|
Write blitz arrays into a desired image format.
Definition at line 64 of file BlitzImageWriter.hh.
◆ writePGM()
static void BlitzImageWriter::writePGM |
( |
const blitz::Array< unsigned char, 2 > & |
data, |
|
|
const std::string & |
fileName, |
|
|
int |
format = 2 |
|
) |
| |
|
static |
Write a .pgm file (portable gray map) from a blitz array Image is written as ASCII data or raw binary depending on the format parameter.
- Parameters
-
data | the blitz array with gray values |
fileName | the image file Name |
format | The format may be 2 (plain ASCII) or 5 (raw binary) |
◆ writePPM()
static void BlitzImageWriter::writePPM |
( |
const ImageAccessWrapper & |
data, |
|
|
const std::string & |
fileName, |
|
|
int |
format = 3 |
|
) |
| |
|
static |
Write a .ppm file (portable pix map) from a blitz array Image is written as ASCII data or raw binary depending on the format parameter.
- Parameters
-
data | wrapped blitz array (might be different formats, default constructor is called) |
fileName | the image file Name |
format | The format may be 3 (plain ASCII) or 6 (raw binary) |
◆ writePNG()
static int BlitzImageWriter::writePNG |
( |
const ImageAccessWrapper & |
data, |
|
|
const std::string & |
fileName, |
|
|
int |
compfac = 9 |
|
) |
| |
|
static |
Write a .png file from a blitz array.
- Parameters
-
data | the blitz array with gray values |
fileName | the image file Name |
compfac | compression factor [1-9], 1: best compression but slow, 9: worst compression but fast |
- Note
- Code adapted from http://www.libpng.org/pub/png/libpng-1.2.5-manual.html
The documentation for this class was generated from the following file: