DGtal 1.3.0
|
Aim: Image Writer using the stb_image.h
header only code.
More...
#include <DGtal/io/writers/STBWriter.h>
Public Types | |
typedef TImageContainer | ImageContainer |
typedef TImageContainer::Domain::Vector | Vector |
typedef TImageContainer::Value | Value |
typedef TFunctor | Functor |
Public Member Functions | |
BOOST_STATIC_ASSERT ((ImageContainer::Domain::dimension==2)) | |
BOOST_CONCEPT_ASSERT ((concepts::CUnaryFunctor< TFunctor, Value, DGtal::Color >)) | |
Static Public Member Functions | |
static bool | exportPNG (const std::string &filename, const ImageContainer &anImage, const Functor &aFunctor=Functor()) |
static bool | exportTGA (const std::string &filename, const ImageContainer &anImage, const Functor &aFunctor=Functor()) |
static bool | exportBMP (const std::string &filename, const ImageContainer &anImage, const Functor &aFunctor=Functor()) |
static bool | exportJPG (const std::string &filename, const ImageContainer &anImage, const Functor &aFunctor=Functor(), int quality=70) |
Aim: Image Writer using the stb_image.h
header only code.
Description of template class 'STBWriter'
These methods export an image in various formats (png, jpg, tga, bmp) by first using the functor to convert the image values to colors.
TImageContainer | the image type |
TFunctor | the functor type that maps the image values to DGtal::Color |
Definition at line 64 of file STBWriter.h.
typedef TFunctor DGtal::STBWriter< TImageContainer, TFunctor >::Functor |
Definition at line 71 of file STBWriter.h.
typedef TImageContainer DGtal::STBWriter< TImageContainer, TFunctor >::ImageContainer |
Definition at line 68 of file STBWriter.h.
typedef TImageContainer::Value DGtal::STBWriter< TImageContainer, TFunctor >::Value |
Definition at line 70 of file STBWriter.h.
typedef TImageContainer::Domain::Vector DGtal::STBWriter< TImageContainer, TFunctor >::Vector |
Definition at line 69 of file STBWriter.h.
DGtal::STBWriter< TImageContainer, TFunctor >::BOOST_CONCEPT_ASSERT | ( | (concepts::CUnaryFunctor< TFunctor, Value, DGtal::Color >) | ) |
DGtal::STBWriter< TImageContainer, TFunctor >::BOOST_STATIC_ASSERT | ( | (ImageContainer::Domain::dimension==2) | ) |
|
static |
Export an image as BMP
filename | the file name to export. |
anImage | the image to export. |
aFunctor | the functor used to import and cast the source image values into the type of the image container value (Value -> DGtal::Color functor). |
Referenced by TEST_CASE().
|
static |
Export an image as JPG
filename | the file name to export. |
anImage | the image to export. |
aFunctor | the functor used to import and cast the source image values into the type of the image container value (Value -> DGtal::Color functor). |
quality | the jpg compression quality (in [0,100], 100 is full quality, def = 70) |
Referenced by TEST_CASE().
|
static |
Export an image as PNG
filename | the file name to export. |
anImage | the image to export. |
aFunctor | the functor used to import and cast the source image values into the type of the image container value (Value -> DGtal::Color functor). |
Referenced by TEST_CASE().
|
static |
Export an image as TGA
filename | the file name to export. |
anImage | the image to export. |
aFunctor | the functor used to import and cast the source image values into the type of the image container value (Value -> DGtal::Color functor). |
Referenced by TEST_CASE().