DocumentImage.fromYuvPlanes Method¶
Module: DocumentImage
Definition¶
Creates an Image from the specified YUV planes.
@staticmethod
from_yuv_planes(y_plane: bytearray, u_plane: bytearray, v_plane: bytearray, y_width: int, y_height: int, uv_pixel_stride: int, uv_row_stride: int, dst_pixel_format: PixelFormat) -> DocumentImage
Parameters
y_planebytearrayin A buffer that contains the Y plane.u_planebytearrayin A buffer that contains the U plane.v_planebytearrayin A buffer that contains the V plane.y_widthintin The width, in pixels, of the Y plane.y_heightintin The height, in pixels, of the Y plane.uv_pixel_strideintin The pixel-level stride, in pixels, of the U and V planes.uv_row_strideintin The row-level stride, in pixels, of the U and V planes.dst_pixel_formatPixelFormatin The pixel format into which to convert the input image.
Returns
The newly created document image.
Exceptions
An error has occurred during Document Library execution.
static DocumentImage fromYuvPlanes(Uint8List? yPlane, Uint8List? uPlane, Uint8List? vPlane, int yWidth, int yHeight, int uvPixelStride, int uvRowStride, PixelFormat dstPixelFormat)
Parameters
yPlaneUint8Listin A buffer that contains the Y plane.uPlaneUint8Listin A buffer that contains the U plane.vPlaneUint8Listin A buffer that contains the V plane.yWidthintin The width, in pixels, of the Y plane.yHeightintin The height, in pixels, of the Y plane.uvPixelStrideintin The pixel-level stride, in pixels, of the U and V planes.uvRowStrideintin The row-level stride, in pixels, of the U and V planes.dstPixelFormatPixelFormatin The pixel format into which to convert the input image.
Returns
The newly created document image.
Exceptions
An error has occurred during Document Library execution.
public static DocumentImage FromYuvPlanes(byte[] yPlane, byte[] uPlane, byte[] vPlane, int yWidth, int yHeight, int uvPixelStride, int uvRowStride, PixelFormat dstPixelFormat)
Parameters
yPlanebyte[]in A buffer that contains the Y plane.uPlanebyte[]in A buffer that contains the U plane.vPlanebyte[]in A buffer that contains the V plane.yWidthintin The width, in pixels, of the Y plane.yHeightintin The height, in pixels, of the Y plane.uvPixelStrideintin The pixel-level stride, in pixels, of the U and V planes.uvRowStrideintin The row-level stride, in pixels, of the U and V planes.dstPixelFormatPixelFormatin The pixel format into which to convert the input image.
Returns
The newly created document image.
Exceptions
An error has occurred during Document Library execution.
public static DocumentImage fromYuvPlanes(byte[] yPlane, byte[] uPlane, byte[] vPlane, int yWidth, int yHeight, int uvPixelStride, int uvRowStride, PixelFormat dstPixelFormat) throws DocumentException
Parameters
yPlanebyte[]in A buffer that contains the Y plane.uPlanebyte[]in A buffer that contains the U plane.vPlanebyte[]in A buffer that contains the V plane.yWidthintin The width, in pixels, of the Y plane.yHeightintin The height, in pixels, of the Y plane.uvPixelStrideintin The pixel-level stride, in pixels, of the U and V planes.uvRowStrideintin The row-level stride, in pixels, of the U and V planes.dstPixelFormatPixelFormatin The pixel format into which to convert the input image.
Returns
The newly created document image.
Exceptions
An error has occurred during Document Library execution.
public static func fromYuvPlanes(yPlane: [UInt8], uPlane: [UInt8], vPlane: [UInt8], yWidth: Int32, yHeight: Int32, uvPixelStride: Int32, uvRowStride: Int32, dstPixelFormat: PixelFormat) throws -> DocumentImage
Parameters
yPlane[UInt8]in A buffer that contains the Y plane.uPlane[UInt8]in A buffer that contains the U plane.vPlane[UInt8]in A buffer that contains the V plane.yWidthInt32in The width, in pixels, of the Y plane.yHeightInt32in The height, in pixels, of the Y plane.uvPixelStrideInt32in The pixel-level stride, in pixels, of the U and V planes.uvRowStrideInt32in The row-level stride, in pixels, of the U and V planes.dstPixelFormatPixelFormatin The pixel format into which to convert the input image.
Returns
The newly created document image.
Exceptions
An error has occurred during Document Library execution.
int id3DocumentImage_FromYuvPlanes (
ID3_DOCUMENT_IMAGE hDocumentImage,
unsigned char * yPlane,
int yPlaneSize,
unsigned char * uPlane,
int uPlaneSize,
unsigned char * vPlane,
int vPlaneSize,
int yWidth,
int yHeight,
int uvPixelStride,
int uvRowStride,
id3DocumentPixelFormat eDstPixelFormat)
Parameters
hDocumentImageID3_DOCUMENT_IMAGEin Handle to the DocumentImage object.yPlaneunsigned char *in A buffer that contains the Y plane.yPlaneSizeintin Size of the ‘yPlane’ buffer.uPlaneunsigned char *in A buffer that contains the U plane.uPlaneSizeintin Size of the ‘uPlane’ buffer.vPlaneunsigned char *in A buffer that contains the V plane.vPlaneSizeintin Size of the ‘vPlane’ buffer.yWidthintin The width, in pixels, of the Y plane.yHeightintin The height, in pixels, of the Y plane.uvPixelStrideintin The pixel-level stride, in pixels, of the U and V planes.uvRowStrideintin The row-level stride, in pixels, of the U and V planes.eDstPixelFormatid3DocumentPixelFormatin The pixel format into which to convert the input image.
Returns