Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
Toggle table of contents sidebar

# Portrait.toBuffer Method

Module: Portrait

## Definition

Exports the portrait to a buffer.

Python

    to_buffer(self) -> bytearray

Returns

> `bytearray`
> The buffer to which the portrait object is exported.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Dart

    Uint8List toBuffer()

Returns

> `Uint8List`
> The buffer to which the portrait object is exported.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

C#

    public byte[] ToBuffer()

Returns

> `byte[]`
> The buffer to which the portrait object is exported.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Java

    public byte[] toBuffer() throws FaceException

Returns

> `byte[]`
> The buffer to which the portrait object is exported.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Swift

    public func toBuffer() throws -> [UInt8]

Returns

> `[UInt8]`
> The buffer to which the portrait object is exported.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

C

    int id3FacePortrait_ToBuffer (
        ID3_FACE_PORTRAIT hPortrait,
        unsigned char * data,
        int * dataSize)

Parameters

> `hPortrait` ID3_FACE_PORTRAIT
> in Handle to the Portrait object.
> `data` unsigned char *
> out The buffer to which the portrait object is exported.
> `dataSize` int *
> in Size of the ‘data’ buffer. Receives the number of elements in the ‘data’ array.

Returns

> `int`
> An error code.
> See id3FaceError file for the list of possible error codes.