Enrollment 28.2.0
Loading...
Searching...
No Matches
ImageFileSaver Class Reference

Saves image to file. More...

#include <ImageEncoder.h>

Collaboration diagram for ImageFileSaver:

Public Member Functions

 ImageFileSaver (std::string path)
 Construct a new Image File Encoder object.
void Save (const RawImage &raw) const final
 Saves given RawImage as encoded image.

Detailed Description

Saves image to file.

The image type is deduced from its extension.

Constructor & Destructor Documentation

◆ ImageFileSaver()

ImageFileSaver ( std::string path)
inlineexplicit

Construct a new Image File Encoder object.

Parameters
pathfile path

Member Function Documentation

◆ Save()

void Save ( const RawImage & raw) const
inlinefinalvirtual

Saves given RawImage as encoded image.

It uses default encoder according to file extension.

Parameters
rawRawImage
Exceptions
ImageExceptionwhen it is not possible to encode image
FileExceptionwhen it is not possible to write image file
EnrollmentExceptionwhen it is not possible to create encoder

Implements ImageSaver.

References ImageEncoder::Create(), and ImageType::FromFileExtension().

Here is the call graph for this function:

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