Class ImageEncoder
Definition
- Namespace:
- Tizen.Multimedia.Util
- Assembly:
- Tizen.Multimedia.Util.dll
- API Level:
- 4
This is a base class for image encoders.
C#Copypublic abstract class ImageEncoder : IDisposable
- Inheritance
-
System.ObjectImageEncoder
- Derived
-
Tizen.Multimedia.Util.JpegXlEncoderTizen.Multimedia.Util.JpegXlEncoderTizen.Multimedia.Util.WebPEncoderTizen.Multimedia.Util.WebPEncoderTizen.Multimedia.Util.WebPEncoderTizen.Multimedia.Util.WebPEncoder
- Implements
-
System.IDisposable
Properties
Declaration
C#Copypublic ImageFormat OutputFormat { get; }
Property Value
Type | Description |
---|---|
ImageFormat |
API Level: 4
Methods
Declaration
C#Copypublic void Dispose()
API Level: 4
Declaration
C#Copyprotected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
API Level: 4
View Source
EncodeAsync(Byte[], Stream)
Encodes an image from a raw image buffer to a specified Stream.
Declaration
C#Copypublic Task EncodeAsync(byte[] inputBuffer, Stream outStream)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | inputBuffer | The image buffer to encode. |
Stream | outStream | The stream that the image is encoded to. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the asynchronous encoding operation. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
System.ArgumentException |
|
InvalidOperationException | The resolution is not set. |
ObjectDisposedException | The ImageEncoder has already been disposed of. |
See Also
API Level: 4
Declaration
C#Copypublic void SetColorSpace(ColorSpace colorSpace)
Parameters
Type | Name | Description |
---|---|---|
ColorSpace | colorSpace | The target color-space. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
|
System.NotSupportedException |
|
See Also
API Level: 4
Declaration
C#Copypublic void SetResolution(Size resolution)
Parameters
Type | Name | Description |
---|---|---|
Size | resolution | The target resolution. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | The width of |
API Level: 4
Implements
System.IDisposable