Class ImageDecoder
Definition
- Namespace:
- Tizen.Multimedia.Util
- Assembly:
- Tizen.Multimedia.Util.dll
This is a base class for image decoders.
public abstract class ImageDecoder : IDisposable
- Inheritance
-
objectImage
Decoder
- Derived
-
Tizen.
Multimedia. Util. Heif Decoder Tizen.Multimedia. Util. Heif Decoder Tizen.Multimedia. Util. Heif Decoder Tizen.Multimedia. Util. Heif Decoder Tizen.Multimedia. Util. Heif Decoder Tizen.Multimedia. Util. Jpeg Xl Decoder Tizen.Multimedia. Util. Jpeg Xl Decoder Tizen.Multimedia. Util. Jpeg Xl Decoder Tizen.Multimedia. Util. Jpeg Xl Decoder Tizen.Multimedia. Util. Web PDecoder Tizen.Multimedia. Util. Web PDecoder Tizen.Multimedia. Util. Web PDecoder Tizen.Multimedia. Util. Web PDecoder Tizen.Multimedia. Util. Web PDecoder Tizen.Multimedia. Util. Web PDecoder
- Implements
-
System.
IDisposable
Properties
View SourceInputFormat
Gets the image format of this decoder.
Declaration
public ImageFormat InputFormat { get; }
Property Value
Type | Description |
---|---|
Image |
Methods
View SourceDecodeAsync(byte[])
Decodes an image from the buffer.
Declaration
public Task<IEnumerable<BitmapFrame>> DecodeAsync(byte[] inputBuffer)
Parameters
Type | Name | Description |
---|---|---|
byte[] | inputBuffer | The image buffer from which to decode. |
Returns
Type | Description |
---|---|
System. |
A task that represents the asynchronous decoding operation. |
Remarks
Only Graphics Interchange Format(GIF) codec returns more than one frame.
Exceptions
Type | Condition |
---|---|
System. |
|
System. |
|
File |
The format of |
System. |
The Image |
DecodeAsync(string)
Decodes an image from the specified file.
Declaration
public Task<IEnumerable<BitmapFrame>> DecodeAsync(string inputFilePath)
Parameters
Type | Name | Description |
---|---|---|
string | inputFilePath | The input file path from which to decode. |
Returns
Type | Description |
---|---|
System. |
A task that represents the asynchronous decoding operation. |
Remarks
Only Graphics Interchange Format(GIF) codec returns more than one frame.
http://tizen.org/privilege/mediastorage is needed if inputFilePath
is relevant to the media storage.
http://tizen.org/privilege/externalstorage is needed if inputFilePath
is relevant to the external storage.
Exceptions
Type | Condition |
---|---|
System. |
|
System. |
|
System. |
|
System. |
The caller does not have required permission to access the path. |
File |
The format of |
System. |
The Image |
Dispose()
Releases all resources used by the ImageDecoder.
Declaration
public void Dispose()
Dispose(bool)
Releases the unmanaged resources used by the ImageDecoder.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
SetColorSpace(ColorSpace)
Sets the color-space to decode into. The default is Rgba8888.
Declaration
public void SetColorSpace(ColorSpace colorSpace)
Parameters
Type | Name | Description |
---|---|---|
Color |
colorSpace | The value indicating color-space to decode into. |
Exceptions
Type | Condition |
---|---|
System. |
|
System. |
|