Image.GetContentAsync Method
Gets the binary content of the image asynchronously.
public abstract Task<byte[]> GetContentAsync( CancellationToken cancellationToken = default )
Parameters
- cancellationToken CancellationToken (Optional)
- Cancellation token that can be used to cancel the operation.
Return Value
Task<Byte[]>Binary content of the image.
Exceptions
Exception | Condition |
---|---|
PermissionException | Content extraction from this document is forbidden by the document author. Not thrown if the document is opened with the owner password (see Password). |
OperationCanceledException | The operation was cancelled because the cancellation token was triggered. |