| layout | default-layout |
|---|---|
| title | class CImageData - Dynamsoft Core Module C++ Edition API Reference |
| description | This page shows the C++ edition of the class CImageData in Dynamsoft Core Module. |
| keywords | image data, c++ |
| needAutoGenerateSidebar | true |
The CImageData class represents image data, which contains the image bytes, width, height, stride, pixel format, orientation and a tag.
Namespace: dynamsoft::basic_structures
Assembly: DynamsoftCore
class CImageData | Method | Description |
|---|---|
CImageData() |
Constructs an empty image data object. |
CImageData(int _bytesLength, const unsigned char* _bytes, int _width, int _height, int _stride, ImagePixelFormat _format, int _orientation=0, const CImageTag* _tag = NULL) |
Constructs an image data object with the specified parameters. |
CImageData(unsigned long long _bytesLength, const unsigned char* _bytes, FreeBytesFunc _freeBytesFunc, int _width, int _height, int _stride, ImagePixelFormat _format, int _orientation=0, const CImageTag* _tag = NULL) |
Constructs an image data object with the specified parameters. |
~CImageData() |
Destructs the image data object and frees the allocated memory. |
GetBytes |
Gets the image byte array. |
GetBytesLength |
Gets the length of the image byte array. |
GetWidth |
Gets the width of the image. |
GetHeight |
Gets the height of the image. |
GetStride |
Gets the stride of the image. |
GetImagePixelFormat |
Gets the pixel format of the image. |
GetOrientation |
Gets the orientation of the image. |
GetImageTag |
Gets the tag of the image. |
SetImageTag |
Sets the tag of the image. |
Constructs an empty image data object.
CImageData()Constructs an image data object with the specified parameters.
CImageData(int _bytesLength, const unsigned char* _bytes, int _width, int _height, int _stride, ImagePixelFormat _format, int _orientation=0, const CImageTag* _tag = NULL)Parameters
_bytesLength The length of the image byte array.
_bytes The image byte array.
_width The width of the image.
_height The height of the image.
_stride The stride of the image.
_format The pixel format of the image.
_orientation The orientation of the image.
_tag The tag of the image.
Constructs an image data object with the specified parameters.
CImageData(unsigned long long _bytesLength, const unsigned char* _bytes, FreeBytesFunc _freeBytesFunc, int _width, int _height, int _stride, ImagePixelFormat _format, int _orientation=0, const CImageTag* _tag = NULL);Parameters
_bytesLength The length of the image byte array.
_bytes The image byte array.
_freeBytesFunc The function to free the image byte array.
_width The width of the image.
_height The height of the image.
_stride The stride of the image.
_format The pixel format of the image.
_orientation The orientation of the image.
_tag The tag of the image.
Destructs the image data object and frees the allocated memory.
virtual ~CImageData()Gets the image byte array.
const unsigned char* GetBytes() constReturn value
Returns a pointer to the image byte array.
Gets the length of the image byte array.
unsigned long long GetBytesLength() constReturn value
Returns the length of the image byte array.
Gets the width of the image.
int GetWidth() constReturn value
Returns the width of the image.
Gets the height of the image.
int GetHeight() constReturn value
Returns the height of the image.
Gets the stride of the image.
int GetStride() constReturn value
Returns the stride of the image.
Gets the pixel format of the image.
ImagePixelFormat GetImagePixelFormat() constReturn value
Returns the pixel format of the image.
See Also
[ImagePixelFormat]({{ site.dcvb_cpp_api }}core/enum-image-pixel-format.html?src=cpp&&lang=cpp)
Gets the orientation of the image.
int GetOrientation() constReturn value
Returns the orientation of the image.
Gets the tag of the image.
const CImageTag* GetImageTag() constReturn value
Returns a pointer to the tag of the image.
See Also
[CImageTag]({{ site.dcvb_cpp_api }}core/basic-structures/image-tag.html)
Sets the tag of the image.
void SetImageTag(const CImageTag* _tag)Parameters
_tag The tag of the image.
See Also
[CImageTag]({{ site.dcvb_cpp_api }}core/basic-structures/image-tag.html)