ImageData
The ImageData
class represents image data, which contains the image bytes, width, height, stride, pixel format, orientation and a tag.
Definition
Module: dynamsoft_core
class ImageData(object)
Methods
Method | Description |
---|---|
__init__ |
Initializes a new instance of the ImageData class. |
get_bytes |
Gets the image byte array. |
get_width |
Gets the width of the image. |
get_height |
Gets the height of the image. |
get_stride |
Gets the stride of the image. |
get_image_pixel_format |
Gets the pixel format of the image. |
get_orientation |
Gets the orientation of the image. |
get_image_tag |
Gets the tag of the image. |
set_image_tag |
Sets the tag of the image. |
__init__
Initializes a new instance of the ImageData
class
def __init__(self, *args):
Parameters
args
<tuple>: A variable-length argument list that must contain following parameters in order:
bytes
<bytes>: The image byte array.width
<int>: The width of the image.height
<int>: The height of the image.stride
<int>: The stride of the image.format
<int>: The pixel format of the image.orientation
<int, optional>: The orientation of the image.tag
<ImageTag, optional>: The tag of the image.
See Also
get_bytes
Gets the image byte array.
def get_bytes(self) -> bytes:
Return Value
Returns an image byte array.
get_width
Gets the width of the image.
def get_width(self) -> int:
Return Value
Returns the width of the image.
get_height
Gets the height of the image.
def get_height(self) -> int:
Return Value
Returns the height of the image.
get_stride
Gets the stride of the image.
def get_stride(self) -> int:
Return Value
Returns the stride of the image.
get_image_pixel_format
Gets the pixel format of the image.
def get_image_pixel_format(self) -> int:
Return Value
Returns the pixel format of the image.
See Also
get_orientation
Gets the orientation of the image.
def get_orientation(self) -> int:
Return Value
Returns the orientation of the image.
get_image_tag
Gets the tag of the image.
def get_image_tag(self) -> ImageTag:
Return Value
Returns a tag of the image.
See Also
set_image_tag
Sets the tag of the image.
def set_image_tag(self, tag: ImageTag) -> None:
Parameters
tag
The tag of the image.
See Also