Back to FabImage Library website
You are here: Start » Function Reference » Image » Image IO » SaveImageToJpeg
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationLite |
Saves an image to a JPEG file.
Syntax
C++
C#
void fil::SaveImageToJpeg ( const fil::Image& inImage, const ftl::File& inFile, ftl::Optional<int> inQuality, bool inIgnoreErrors )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inImage | const Image& | An image to be saved | ||
![]() |
inFile | const File& | Path to a file | ||
![]() |
inQuality | Optional<int> | 0 - 100 | NIL | Quality |
![]() |
inIgnoreErrors | bool | Switches to re-trying and canceling in case of errors (e.g. when the disk is full) |
Requirements
For input inImage only pixel formats are supported: uint8, uint16.
Read more about pixel formats in Image documentation.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Not supported inImage pixel format in SaveImageToJpeg. Supported formats: UInt8, UInt16. |