Image.fromYuvPlanes Method¶
Module: Image
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) -> Image
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 image.
Exceptions
An error has occurred during Face Library execution.
static Image 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 image.
Exceptions
An error has occurred during Face Library execution.
public static Image 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 image.
Exceptions
An error has occurred during Face Library execution.
public static Image fromYuvPlanes(byte[] yPlane, byte[] uPlane, byte[] vPlane, int yWidth, int yHeight, int uvPixelStride, int uvRowStride, PixelFormat dstPixelFormat) throws FaceException
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 image.
Exceptions
An error has occurred during Face Library execution.
public static func fromYuvPlanes(yPlane: [UInt8], uPlane: [UInt8], vPlane: [UInt8], yWidth: Int32, yHeight: Int32, uvPixelStride: Int32, uvRowStride: Int32, dstPixelFormat: PixelFormat) throws -> Image
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 image.
Exceptions
An error has occurred during Face Library execution.
int id3FaceImage_FromYuvPlanes (
ID3_FACE_IMAGE hImage,
unsigned char * yPlane,
int yPlaneSize,
unsigned char * uPlane,
int uPlaneSize,
unsigned char * vPlane,
int vPlaneSize,
int yWidth,
int yHeight,
int uvPixelStride,
int uvRowStride,
id3FacePixelFormat eDstPixelFormat)
Parameters
hImageID3_FACE_IMAGEin Handle to the Image 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.eDstPixelFormatid3FacePixelFormatin The pixel format into which to convert the input image.
Returns