SbImage class that wraps the sb_t_image structure.
You must call the Dispose() method to free all the resources of the returned instance.
More...
#include <cs_image.h>
|
SbImageFormat | Format () |
| Format of the image pixel
|
|
SbImageCompressType | Compression () |
| Image compression type
|
|
int | Width () |
| Width, in pixel, of the image.
|
|
int | Height () |
| Height, in pixel, of the image.
|
|
int | WidthStep () |
| Number of bytes to move the pointer to one row to the next one.
|
|
int | BytesPerPixel () |
| Number of bytes of each pixel. More...
|
|
int | Size () |
| Dimension, in bytes, of the vector sb_t_image::data.
|
|
IntPtr | Data () |
| Pointer to the data.
|
|
SbError | SetData (IntPtr data) |
| Sets the pointer to a block of memory for image data. More...
|
|
SbError | Save (String^ filename) |
| Saves the image to file More...
|
|
SbImage | Convert (SbImageFormat format) |
| Converts the image to the specified format.
More...
|
|
SbImage | Compress (SbImageCompressType compression) |
| Compresses the image with the compression type specified.
More...
|
|
SbImage | Decompress () |
| Decompresses the image.
More...
|
|
SbImage | Clone () |
| Clones the image.@ More...
|
|
SbError | Copy (SbImage ^dst) |
| Copies the image content More...
|
|
SbError | Clean () |
| Cleans the image More...
|
|
SbError | Flip (SbImage ^dst, SbImageFlipMode flipmode) |
| Flips the image More...
|
|
SbError | Rotate (SbImage ^dst, SbPoint ^centre, float angle, SbInterpolationMode InterpolationMode) |
| Rotates the image More...
|
|
SbError | Resize (SbImage ^dst, SbRect ^rect, float scale, SbInterpolationMode InterpolationMode) |
| Resizes the image More...
|
|
SbError | Error () |
| Returns the error code of the last operation. If no error SbError.SB_ERR_NONE is returned. More...
|
|
String | ErrorMsg () |
| Returns the error message of the last operation. More...
|
|
SbImage class that wraps the sb_t_image structure.
You must call the Dispose() method to free all the resources of the returned instance.
Definition at line 65 of file cs_image.h.
◆ BytesPerPixel()
int sb_cs::SbImage::BytesPerPixel |
( |
| ) |
|
Number of bytes of each pixel.
The values are:
◆ Clean()
◆ Clone()
Clones the image.@
- Returns
- An instance to the SbImage class or null in case of memory error.
The instance returned is valid only if the SbImage.Error() is equal to SbError::SB_ERR_NONE, otherwise an error occurred.
You must call the Dispose() method to free all the resources of the returned instance.
- See also
- sb_image_clone
◆ Compress()
Compresses the image with the compression type specified.
- Parameters
-
compression | Compression type |
- Returns
- An instance to the SbImage class or null in case of memory error.
The instance returned is valid only if the SbImage.Error() is equal to SbError::SB_ERR_NONE, otherwise an error occurred.
You must call the Dispose() method to free all the resources of the returned instance.
- See also
- sb_image_compress
◆ Convert()
Converts the image to the specified format.
- Parameters
-
- Returns
- An instance to the SbImage class or null in case of memory error.
The instance returned is valid only if the SbImage.Error() is equal to SbError::SB_ERR_NONE, otherwise an error occurred.
You must call the Dispose() method to free all the resources of the returned instance.
- See also
- sb_image_convert
◆ Copy()
◆ Create()
Creates an image.
- Parameters
-
width | Image width |
height | Image height |
format | Image format |
- Returns
- An instance to the SbImage class or null in case of memory error.
The instance returned is valid only if the SbImage.Error() is equal to SbError::SB_ERR_NONE, otherwise an error occurred.
You must call the Dispose() method to free all the resources of the returned instance.
- See also
- sb_image_create
◆ CreateHeader()
static SbImage sb_cs::SbImage::CreateHeader |
( |
int |
width, |
|
|
int |
height, |
|
|
int |
width_step, |
|
|
SbImageFormat |
format |
|
) |
| |
|
static |
Creates the image header without allocating the data.
- Parameters
-
width | Image width |
height | Image height |
width_step | Image width step |
format | Image format |
- Returns
- An instance to the SbImage class or null in case of memory error.
The instance returned is valid only if the SbImage.Error() is equal to SbError::SB_ERR_NONE, otherwise an error occurred.
You must call the Dispose() method to free all the resources of the returned instance.
- See also
- sb_image_create_header
◆ Decompress()
SbImage sb_cs::SbImage::Decompress |
( |
| ) |
|
Decompresses the image.
- Returns
- An instance to the SbImage class or null in case of memory error.
The instance returned is valid only if the SbImage.Error() is equal to SbError::SB_ERR_NONE, otherwise an error occurred.
You must call the Dispose() method to free all the resources of the returned instance.
- See also
- sb_image_decompress
◆ Flip()
◆ Load()
static SbImage sb_cs::SbImage::Load |
( |
String^ |
filename | ) |
|
|
static |
Loads an image from file.
- Parameters
-
filename | The filename of the image to load |
- Returns
- An instance to the SbImage class or null in case of memory error.
The instance returned is valid only if the SbImage.Error() is equal to SbError::SB_ERR_NONE, otherwise an error occurred.
You must call the Dispose() method to free all the resources of the returned instance.
- See also
- sb_image_load
◆ Resize()
Resizes the image
- Parameters
-
dst | Destination image |
rect | Coordinates of the rectangular ROI of the source image that have to be resized. |
scale | Scale factor |
InterpolationMode | Interpolation mode. |
- Returns
- If successful, returns SbError.SB_ERR_NONE. Otherwise, it returns an error code SbError.
- See also
- sb_image_resize
◆ Rotate()
Rotates the image
- Parameters
-
dst | Destination image |
centre | Center of the rotation |
angle | Angle of rotation in radians, clockwise if positive. |
InterpolationMode | Interpolation mode. |
- Returns
- If successful, returns SbError.SB_ERR_NONE. Otherwise, it returns an error code SbError.
- See also
- sb_image_rotate
◆ Save()
SbError sb_cs::SbImage::Save |
( |
String^ |
filename | ) |
|
◆ SetData()
SbError sb_cs::SbImage::SetData |
( |
IntPtr |
data | ) |
|
The documentation for this class was generated from the following file: