layout | title | description | keywords | needAutoGenerateSidebar |
---|---|---|---|---|
default-layout |
class CImageData - Dynamsoft Core Module C++ Edition API Reference |
This page shows the C++ edition of the class CImageData in Dynamsoft Core Module. |
image data, c++ |
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() |
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.
Destructs the image data object and frees the allocated memory.
virtual ~CImageData()
Gets the image byte array.
const unsigned char* GetBytes() const
Return value
Returns a pointer to the image byte array.
Gets the length of the image byte array.
int GetBytesLength() const
Return value
Returns the length of the image byte array.
Gets the width of the image.
int GetWidth() const
Return value
Returns the width of the image.
Gets the height of the image.
int GetHeight() const
Return value
Returns the height of the image.
Gets the stride of the image.
int GetStride() const
Return value
Returns the stride of the image.
Gets the pixel format of the image.
ImagePixelFormat GetImagePixelFormat() const
Return value
Returns the pixel format of the image.
See Also
[ImagePixelFormat]({{ site.dcv_enumerations }}core/image-pixel-format.html?src=cpp&&lang=cpp)
Gets the orientation of the image.
int GetOrientation() const
Return value
Returns the orientation of the image.
Gets the tag of the image.
const CImageTag* GetImageTag() const
Return value
Returns a pointer to the tag of the image.
See Also
[CImageTag]({{ site.dcv_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.dcv_cpp_api }}core/basic-structures/image-tag.html)