|
Enrollment 28.2.0
|
Converts image type ImageType::WEBP. More...
#include <ImageEncoder.h>
Public Member Functions | |
| WebpImageEncoder () | |
| Construct a new webp Image Encoder object The default quality is set to 95. | |
| void | SetQuality (int quality) |
| Set quality. | |
| int | GetQuality () const |
| Provides quality. | |
| void | Accept (ImageEncoderVisitor &visitor) const final |
| Allow visitor to visit concrete type of encoder. | |
| std::vector< uint8_t > | Encode (const RawImage &raw) const final |
| Saves given RawImage as formatted image. | |
Static Public Member Functions | |
| static std::shared_ptr< ImageEncoder > | Create (ImageType type) |
| Create concrete default encoder for given type. | |
Converts image type ImageType::WEBP.
|
inlinefinalvirtual |
Allow visitor to visit concrete type of encoder.
| visitor | ImageEncoderVisitor to call |
Implements ImageEncoder.
|
inlinestaticinherited |
Create concrete default encoder for given type.
| type | ImageType |
| EnrollmentException | when image type is unknown |
References ImageType::BMP, ImageType::IRAW, ImageType::JPG, ImageType::JPG2000, ImageType::PNG, ImageType::TIFF, ImageException::UNKNOWN_IMAGE, ImageType::WEBP, and ImageType::WSQ.
Referenced by Image::Decode(), and ImageFileSaver::Save().
|
inlinefinalvirtualinherited |
Saves given RawImage as formatted image.
| raw | RawImage |
| ImageException | when it is not possible to encode image |
| InvalidImageArgumentException | when image is empty |
Implements ImageEncoder.
|
inline |
Provides quality.
|
inline |
Set quality.
| quality | It it can be a quality from 0 to 100 (the higher is the better). 100 is for lossless compression. |
| EnrollmentInvalidArgumentException | when quality is not in range |