DocumentImage.fromBuffer Method¶
Module: DocumentImage
Definition¶
Creates an Image from the specified data buffer.
@staticmethod
from_buffer(data: bytearray, pixel_format: PixelFormat) -> DocumentImage
Parameters
databytearrayin A buffer that contains the image data.pixel_formatPixelFormatin The destination pixel format to convert the input to.
Returns
The newly created document image.
Exceptions
An error has occurred during Document Library execution.
static DocumentImage fromBuffer(Uint8List? data, PixelFormat pixelFormat)
Parameters
dataUint8Listin A buffer that contains the image data.pixelFormatPixelFormatin The destination pixel format to convert the input to.
Returns
The newly created document image.
Exceptions
An error has occurred during Document Library execution.
public static DocumentImage FromBuffer(byte[] data, PixelFormat pixelFormat)
Parameters
databyte[]in A buffer that contains the image data.pixelFormatPixelFormatin The destination pixel format to convert the input to.
Returns
The newly created document image.
Exceptions
An error has occurred during Document Library execution.
public static DocumentImage fromBuffer(byte[] data, PixelFormat pixelFormat) throws DocumentException
Parameters
databyte[]in A buffer that contains the image data.pixelFormatPixelFormatin The destination pixel format to convert the input to.
Returns
The newly created document image.
Exceptions
An error has occurred during Document Library execution.
public static func fromBuffer(data: [UInt8], pixelFormat: PixelFormat) throws -> DocumentImage
Parameters
data[UInt8]in A buffer that contains the image data.pixelFormatPixelFormatin The destination pixel format to convert the input to.
Returns
The newly created document image.
Exceptions
An error has occurred during Document Library execution.
int id3DocumentImage_FromBuffer (
ID3_DOCUMENT_IMAGE hDocumentImage,
unsigned char * data,
int dataSize,
id3DocumentPixelFormat ePixelFormat)
Parameters
hDocumentImageID3_DOCUMENT_IMAGEin Handle to the DocumentImage object.dataunsigned char *in A buffer that contains the image data.dataSizeintin Size of the ‘data’ buffer.ePixelFormatid3DocumentPixelFormatin The destination pixel format to convert the input to.
Returns