mimas::image_fileoutput< T > Class Template Reference
[Image Output]

Sink for writing an image to a file. More...

#include <image_fileoutput.h>

Inheritance diagram for mimas::image_fileoutput< T >:

Inheritance graph
[legend]
Collaboration diagram for mimas::image_fileoutput< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 image_fileoutput (std::ostream &_stream)
 Constructor.
virtual ~image_fileoutput (void)
 Destructor.
virtual void write (const const_image_ref< T > &image)
 Write image to stream.
template<>
const char * mapString (void)
template<>
const char * mapString (void)
template<>
const char * defaultFormat (void)
template<>
const char * defaultFormat (void)

Static Public Member Functions

static std::map< std::string,
bool > 
formats (void)
 Get list of supported file-formats.

Static Protected Member Functions

static const char * mapString (void)
 Identification of mapping.
static const char * defaultFormat (void)
 Identification of default output format.

Protected Attributes

std::ostream * stream
 Pointer to stream.
std::list< Magick::Image > buffer
 Buffer for multiple images.

Detailed Description

template<typename T>
class mimas::image_fileoutput< T >

Sink for writing an image to a file.

The stream is used for writing image(s) to. The stream-manipulator setformat can be used to change the file-format.

The Magick++ library is used for writing the images.

Currently Magick++ supports writing the following file-formats: 8BIM 8BIMTEXT 8BIMWTEXT APP1 APP1JPEG AVS BIE BMP BMP2 BMP3 CMYK CMYKA DCX DPX EPDF EPI EPS EPS2 EPS3 EPSF EPSI EPT EXIF FAX FITS FPX G3 GIF GIF87 GRAY HISTOGRAM HTM HTML ICB ICC ICM IPTC IPTCTEXT IPTCWTEXT JBG JBIG JNG JPEG JPG LOGO M2V MAP MATTE MIFF MNG MONO MPC MPEG MPG MSL MTV MVG NULL OTB P7 PAL PALM PBM PCD PCDS PCL PCT PCX PDB PDF PGM PICON PICT PM PNG PNG24 PNG32 PNG8 PNM PPM PREVIEW PS PS2 PS3 PSD PTIF RAS RGB RGBA SGI SHTML SUN SVG TEXT TGA TIF TIFF TXT UIL UYVY VDA VICAR VID VIFF VST WBMP X XBM XMP XPM XV XWD YUV

Author:
Jan Wedekind (jan at wedesoft.de)
Date:
Thu Jan 12 14:19:44 UTC 2006
See also:
image_fileinput

setformat

Definition at line 39 of file image_fileoutput.h.


Constructor & Destructor Documentation

template<typename T>
mimas::image_fileoutput< T >::image_fileoutput ( std::ostream &  _stream  )  [inline, explicit]

Constructor.

Parameters:
_stream Stream to write images to.

Definition at line 44 of file image_fileoutput.h.

template<typename T>
virtual mimas::image_fileoutput< T >::~image_fileoutput ( void   )  [virtual]

Destructor.

The destructor will write the images to the stream!


Member Function Documentation

template<typename T>
virtual void mimas::image_fileoutput< T >::write ( const const_image_ref< T > &  image  )  [virtual]

Write image to stream.

Parameters:
img Image to write to the stream.

Implements mimas::image_output< T >.

template<typename T>
static std::map< std::string, bool > mimas::image_fileoutput< T >::formats ( void   )  [static]

Get list of supported file-formats.

Gets a map of file-formats, which have write-support by Magick++. The boolean is indicating, wether the file-format allows saving of multiple images or not.

template<typename T>
static const char* mimas::image_fileoutput< T >::mapString ( void   )  [static, protected]

Identification of mapping.

This method returns a parameter passed to Magick::Image::write. The return value either is "BGRA" or "I".

template<typename T>
static const char* mimas::image_fileoutput< T >::defaultFormat ( void   )  [static, protected]

Identification of default output format.

This method returns a parameter passed to Magick::Image::magick. The return value either is "PPM" or "PGM".

template<>
const char * mimas::image_fileoutput< unsigned char >::mapString ( void   ) 

template<>
const char * mimas::image_fileoutput< rgba< unsigned char > >::mapString ( void   ) 

template<>
const char * mimas::image_fileoutput< unsigned char >::defaultFormat ( void   ) 

template<>
const char * mimas::image_fileoutput< rgba< unsigned char > >::defaultFormat ( void   ) 


Member Data Documentation

template<typename T>
std::ostream* mimas::image_fileoutput< T >::stream [protected]

Pointer to stream.

Definition at line 66 of file image_fileoutput.h.

template<typename T>
std::list< Magick::Image > mimas::image_fileoutput< T >::buffer [protected]

Buffer for multiple images.

Definition at line 68 of file image_fileoutput.h.


The documentation for this class was generated from the following file:
[GNU/Linux] [Qt] [Mesa] [STL] [Lapack] [Boost] [Magick++] [Xalan-C and Xerces-C] [doxygen] [graphviz] [FFTW] [popt] [xine] [Gnuplot] [gnu-arch] [gcc] [gstreamer] [autoconf/automake/make] [freshmeat.net] [opensource.org] [sourceforge.net] [MMVL]
mimas 2.1 - Copyright Mon Oct 30 11:31:31 2006, Bala Amavasai, Stuart Meikle, Arul Selvan, Fabio Caparrelli, Jan Wedekind, Manuel Boissenin, ...