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