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

# DocumentImage.toRawBuffer Method

Module: DocumentImage

## Definition

Copies image pixels in the specified format into a buffer.

Python

    to_raw_buffer(self, pixel_format: PixelFormat, buffer: ImageBuffer) -> None

Parameters

> `pixel_format` PixelFormat
> in The pixel format.
> `buffer` ImageBuffer
> in Buffer that receives the raw image data.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Dart

    void toRawBuffer(PixelFormat pixelFormat, ImageBuffer buffer)

Parameters

> `pixelFormat` PixelFormat
> in The pixel format.
> `buffer` ImageBuffer
> in Buffer that receives the raw image data.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

C#

    public void ToRawBuffer(PixelFormat pixelFormat, ImageBuffer buffer)

Parameters

> `pixelFormat` PixelFormat
> in The pixel format.
> `buffer` ImageBuffer
> in Buffer that receives the raw image data.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Java

    public void toRawBuffer(PixelFormat pixelFormat, ImageBuffer buffer) throws DocumentException

Parameters

> `pixelFormat` PixelFormat
> in The pixel format.
> `buffer` ImageBuffer
> in Buffer that receives the raw image data.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Swift

    public func toRawBuffer(pixelFormat: PixelFormat, buffer: ImageBuffer) throws

Parameters

> `pixelFormat` PixelFormat
> in The pixel format.
> `buffer` ImageBuffer
> in Buffer that receives the raw image data.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

C

    int id3DocumentImage_ToRawBuffer (
        ID3_DOCUMENT_IMAGE hDocumentImage,
        id3DocumentPixelFormat ePixelFormat,
        ID3_DOCUMENT_IMAGE_BUFFER hBuffer)

Parameters

> `hDocumentImage` ID3_DOCUMENT_IMAGE
> in Handle to the DocumentImage object.
> `ePixelFormat` id3DocumentPixelFormat
> in The pixel format.
> `hBuffer` ID3_DOCUMENT_IMAGE_BUFFER
> in Buffer that receives the raw image data.

Returns

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