LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::saveJPEG Class Reference

Functor for writing a lti::image to a JPEG file To save a JPEG image just initialize the parameters of the "saveJPEG" object and call the apply member. More...

#include <ltiJPEGFunctor.h>

Inheritance diagram for lti::saveJPEG:
Inheritance graph
[legend]
Collaboration diagram for lti::saveJPEG:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 saveJPEG ()
 ~saveJPEG ()
virtual const char * getTypeName () const
bool apply (const image &theImage)
bool apply (const channel &theChannel)
bool apply (const channel8 &theChannel)
bool save (const std::string &filename, const image &theImage)
bool save (const std::string &filename, const channel &theChannel)
bool save (const std::string &filename, const channel8 &theChannel)
bool save (std::ofstream &file, const image &theImage)
virtual functorclone () const

Detailed Description

Functor for writing a lti::image to a JPEG file To save a JPEG image just initialize the parameters of the "saveJPEG" object and call the apply member.

Example:

 lti::image anImg;                       // an image
 ...
 lti::saveJPEG saveImg;                  // the save functor
 lti::saveJPEG::parameters param;        // functor parameters
 param.filename = "~/tmp/theFile.jpeg";  // name of the JPEG file
 saveImg.setParameters(param);           // set the functor parameters
 saveImg.apply(anImg);                   // save the file

You can also use the more confortable shortcut:

 lti::image anImg;                       // an image
 ...
 lti::saveJPEG saveImg;                  // the save functor
 saveImg.save("~/tmp/theFile.jpeg",img); // save the image.
See also:
loadJPEG
image
saveJPEG::parameters

Constructor & Destructor Documentation

lti::saveJPEG::saveJPEG (  ) 

default constructor

lti::saveJPEG::~saveJPEG (  ) 

destructor


Member Function Documentation

bool lti::saveJPEG::apply ( const channel8 theChannel  ) 

save JPEG image

Parameters:
theChannel the channel to be saved
bool lti::saveJPEG::apply ( const channel theChannel  )  [virtual]

save JPEG image

Parameters:
theChannel the channel to be saved

Reimplemented from lti::ioFunctor.

bool lti::saveJPEG::apply ( const image theImage  )  [virtual]

save JPEG image

Parameters:
theImage the image to be saved

Reimplemented from lti::ioFunctor.

virtual functor* lti::saveJPEG::clone (  )  const [virtual]

returns a pointer to a clone of the functor.

Implements lti::functor.

virtual const char* lti::saveJPEG::getTypeName (  )  const [virtual]

returns the name of this type

Reimplemented from lti::ioJPEG.

bool lti::saveJPEG::save ( std::ofstream &  file,
const image theImage 
)

method for saving a JPEG image to an already opened stream.

The stream is left open in this method.

bool lti::saveJPEG::save ( const std::string &  filename,
const channel8 theChannel 
)

shortcut for load JPEG

Parameters:
filename name of the file to save
theChannel the channel to be saved
bool lti::saveJPEG::save ( const std::string &  filename,
const channel theChannel 
)

shortcut for load JPEG

Parameters:
filename name of the file to save
theChannel the channel to be saved
bool lti::saveJPEG::save ( const std::string &  filename,
const image theImage 
) [virtual]

shortcut for load JPEG

Parameters:
filename name of the file to save
theImage the image to be saved

Reimplemented from lti::ioFunctor.


The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:28:03 2010 for LTI-Lib by Doxygen 1.6.1