Class storing all information needed to save an image. More...
#include <SaveInfo.hpp>
Public Member Functions | |
SaveInfo (std::string fileName) | |
A constructor. More... | |
SaveInfo (std::string fileName, Formats::Enum format) | |
A constructor. More... | |
Protected Member Functions | |
std::string | fileName () const |
Returns the name of the file. More... | |
Formats::Enum | format () const |
Returns format of the file. More... | |
Friends | |
class | EncoderFactory |
Class storing all information needed to save an image.
The class stores the destination file name and other information such as the file format.
FotoSHOCKcore::IO::SaveInfo::SaveInfo | ( | std::string | fileName) |
A constructor.
Constructs a new SaveInfo for the file fileName. The file format is guessed from the file extension. If it is not possible to guess the format, an IOException is thrown.
fileName | name of the destination file |
FotoSHOCKcore::IO::SaveInfo::SaveInfo | ( | std::string | fileName, |
Formats::Enum | format | ||
) |
A constructor.
Constructs a new SaveInfo for the file fileName using the specified format. This constructor can thus be used to force a specific format no matter the file extensions (it can be used to eg. save image to file foo.png using the JPEG compression).
fileName | name of the destination file |
format | format of the file |
|
protected |
Returns the name of the file.
|
protected |
Returns format of the file.