oevislib_net  0.14.3.0
Loading...
Searching...
No Matches

Functions

static Image oevislib_net.Image.Decode (ByteBuffer inBuffer, bool inLoadAlphaChannel=false)
 Decode an image from a buffer.
static Image oevislib_net.Image.DecodeFromBase64 (string inString, bool inLoadAlphaChannel=false)
 Decode an image from a Base64 encoded string.
ByteBuffer oevislib_net.Image.Encode (ImageFileFormat inImageFileFormat, bool inIgnoreErrors=false)
 Encode the image into a buffer.
string oevislib_net.Image.EncodeToBase64 (ImageFileFormat inImageFileFormat, bool inIgnoreErrors=false)
 Encode the image into a Base64 string.
static Image oevislib_net.Image.Load (string inFile, bool inLoadAlphaChannel=false)
 Loads an image from a file.
void oevislib_net.Image.Save (string inFile, Optional< ImageFileFormat > inImageFileFormat=null, bool inIgnoreErrors=false)
 Saves the image in a file.

Detailed Description

Function Documentation

◆ Decode()

Image oevislib_net.Image.Decode ( ByteBuffer inBuffer,
bool inLoadAlphaChannel = false )
inlinestatic

Decode an image from a buffer.

Parameters
inBufferBuffer.
inLoadAlphaChannelWhether to load also the alpha channel (only if present).
Returns
Decoded image.

◆ DecodeFromBase64()

Image oevislib_net.Image.DecodeFromBase64 ( string inString,
bool inLoadAlphaChannel = false )
inlinestatic

Decode an image from a Base64 encoded string.

The number of image pixels must be less than 2^30.

Parameters
inStringBase64 encoded string.
inLoadAlphaChannelWhether to load also the alpha channel (only if present).
Returns
Decoded image.

◆ Encode()

ByteBuffer oevislib_net.Image.Encode ( ImageFileFormat inImageFileFormat,
bool inIgnoreErrors = false )
inline

Encode the image into a buffer.

The number of image pixels must be less than 2^30.

Parameters
inImageFileFormatFile format (BMP, JPEG, PNG, TIFF) to which the image is saved.
inIgnoreErrorsWhether to ignore errors caused by the encoding process (in this case the function returns as nothing has happened).
Returns
Output buffer.

◆ EncodeToBase64()

string oevislib_net.Image.EncodeToBase64 ( ImageFileFormat inImageFileFormat,
bool inIgnoreErrors = false )
inline

Encode the image into a Base64 string.

Parameters
inImageFileFormatFile format (BMP, JPEG, PNG, TIFF) to which the image is saved.
inIgnoreErrorsWhether to ignore errors caused by the encoding process (in this case the function returns as nothing has happened).
Returns
Base64 encoded string.

◆ Load()

Image oevislib_net.Image.Load ( string inFile,
bool inLoadAlphaChannel = false )
inlinestatic

Loads an image from a file.

The number of image pixels must be less than 2^30. All of following formats are supported: BMP, JPEG, PBM/PGM/PPM/PNM, PNG, TIFF, WEBP.

Parameters
inFileName of the file.
inLoadAlphaChannelWhether to load also the alpha channel (only if present).
Returns
Loaded image.

◆ Save()

void oevislib_net.Image.Save ( string inFile,
Optional< ImageFileFormat > inImageFileFormat = null,
bool inIgnoreErrors = false )
inline

Saves the image in a file.

The number of image pixels must be less than 2^30. All UInt8, single-channel or 3-channel, images can be saved with every format. The following formats have some exceptions: PNM can also save UInt16 images; PNG can also save UInt16 images and 4-channels images (RGBA); TIFF can also save UInt16 and Float images.

Parameters
inFileName of the file.
inImageFileFormatOptional file format (BMP, JPEG, PNG, PNM, TIFF, WEBP). If not defined it has to be present in the filename.
inIgnoreErrorsWhether to ignore errors caused by the saving process (in this case the function returns as nothing has happened).