|
latest version v1.9 - last update 10 Apr 2010 |
|
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>


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 functor * | clone () const |
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.
| lti::saveJPEG::saveJPEG | ( | ) |
default constructor
| lti::saveJPEG::~saveJPEG | ( | ) |
destructor
| bool lti::saveJPEG::apply | ( | const channel8 & | theChannel | ) |
| bool lti::saveJPEG::apply | ( | const channel & | theChannel | ) | [virtual] |
| bool lti::saveJPEG::apply | ( | const image & | theImage | ) | [virtual] |
| 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
| 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
| 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
| filename | name of the file to save | |
| theImage | the image to be saved |
Reimplemented from lti::ioFunctor.