MLT
7.28.0
|
#include <mlt_image.h>
Public Member Functions | |
void | mlt_image_alloc_alpha (mlt_image self) |
Allocate the alpha field based on the other properties of the Image. More... | |
void | mlt_image_alloc_data (mlt_image self) |
Allocate the data field based on the other properties of the Image. More... | |
int | mlt_image_calculate_size (mlt_image self) |
Calculate the number of bytes needed for the Image data. More... | |
void | mlt_image_close (mlt_image self) |
Destroy an image object created by mlt_image_new(). More... | |
void | mlt_image_fill_black (mlt_image self) |
Fill an image with black. More... | |
void | mlt_image_fill_checkerboard (mlt_image self, double sample_aspect_ratio) |
Fill an image with a checkerboard pattern. More... | |
void | mlt_image_fill_opaque (mlt_image self) |
Fill an image alpha channel with opaque if it exists. More... | |
void | mlt_image_fill_white (mlt_image self, int full_range) |
Fill an image with white. More... | |
mlt_image_format | mlt_image_format_id (const char *name) |
Get the id of image format from short name. More... | |
const char * | mlt_image_format_name (mlt_image_format format) |
Get the short name for an image format. More... | |
void | mlt_image_format_planes (mlt_image_format format, int width, int height, void *data, uint8_t *planes[4], int strides[4]) |
Build a planes pointers of image mapping. More... | |
int | mlt_image_format_size (mlt_image_format format, int width, int height, int *bpp) |
Get the number of bytes needed for an image. More... | |
void | mlt_image_get_values (mlt_image self, void **data, mlt_image_format *format, int *width, int *height) |
Get the most common values for the image. More... | |
int | mlt_image_rgba_opaque (uint8_t *image, int width, int height) |
Check if the alpha channel of an rgba image is opaque. More... | |
void | mlt_image_set_values (mlt_image self, void *data, mlt_image_format format, int width, int height) |
Set the most common values for the image. More... | |
Data Fields | |
void * | alpha |
mlt_destructor | close |
int | colorspace |
void * | data |
mlt_image_format | format |
int | height |
uint8_t * | planes [MLT_IMAGE_MAX_PLANES] |
mlt_destructor | release_alpha |
mlt_destructor | release_data |
int | strides [MLT_IMAGE_MAX_PLANES] |
int | width |
void mlt_image_alloc_alpha | ( | mlt_image | self | ) |
Allocate the alpha field based on the other properties of the Image.
If the alpha field is already set, and a destructor function exists, the data will be released. Else, the data pointer will be overwritten without being released.
After this function call, the release_data field will be set and can be used to release the data when necessary.
self | the Image object |
void mlt_image_alloc_data | ( | mlt_image | self | ) |
Allocate the data field based on the other properties of the Image.
If the data field is already set, and a destructor function exists, the data will be released. Else, the data pointer will be overwritten without being released.
After this function call, the release_data field will be set and can be used to release the data when necessary.
self | the Image object |
int mlt_image_calculate_size | ( | mlt_image | self | ) |
Calculate the number of bytes needed for the Image data.
self | the Image object |
void mlt_image_close | ( | mlt_image | self | ) |
Destroy an image object created by mlt_image_new().
self | the Image object |
void mlt_image_fill_black | ( | mlt_image | self | ) |
Fill an image with black.
self | a mlt_image |
void mlt_image_fill_checkerboard | ( | mlt_image | self, |
double | sample_aspect_ratio | ||
) |
Fill an image with a checkerboard pattern.
self | a mlt_image |
sample_aspect_ratio | the pixel aspect ratio |
void mlt_image_fill_opaque | ( | mlt_image | self | ) |
Fill an image alpha channel with opaque if it exists.
void mlt_image_fill_white | ( | mlt_image | self, |
int | full_range | ||
) |
Fill an image with white.
self | a mlt_image |
full_range | whether to use full color range |
mlt_image_format mlt_image_format_id | ( | const char * | name | ) |
Get the id of image format from short name.
name | the image format short name |
const char * mlt_image_format_name | ( | mlt_image_format | format | ) |
Get the short name for an image format.
format | the image format |
void mlt_image_format_planes | ( | mlt_image_format | format, |
int | width, | ||
int | height, | ||
void * | data, | ||
uint8_t * | planes[4], | ||
int | strides[4] | ||
) |
Build a planes pointers of image mapping.
For proper and unified planar image processing, planes sizes and planes pointers should be provides to processing code.
format | the image format | |
width | width of the image in pixels | |
height | height of the image in pixels | |
[in] | data | pointer to allocated image |
[out] | planes | pointers to plane's pointers will be set |
[out] | strides | pointers to plane's strides will be set |
int mlt_image_format_size | ( | mlt_image_format | format, |
int | width, | ||
int | height, | ||
int * | bpp | ||
) |
Get the number of bytes needed for an image.
format | the image format | |
width | width of the image in pixels | |
height | height of the image in pixels | |
[out] | bpp | the number of bytes per pixel (optional) |
void mlt_image_get_values | ( | mlt_image | self, |
void ** | data, | ||
mlt_image_format * | format, | ||
int * | width, | ||
int * | height | ||
) |
Get the most common values for the image.
self | the Image object | |
[out] | data | the buffer that contains the image data |
[out] | format | the image format |
[out] | width | the width of the image |
[out] | height | the height of the image |
int mlt_image_rgba_opaque | ( | uint8_t * | image, |
int | width, | ||
int | height | ||
) |
Check if the alpha channel of an rgba image is opaque.
image | the image buffer |
width | width of the image in pixels |
height | height of the image in pixels |
void mlt_image_set_values | ( | mlt_image | self, |
void * | data, | ||
mlt_image_format | format, | ||
int | width, | ||
int | height | ||
) |
Set the most common values for the image.
Less common values will be set to reasonable defaults.
self | the Image object |
data | the buffer that contains the image data |
format | the image format |
width | the width of the image |
height | the height of the image |
void* mlt_image_s::alpha |
mlt_destructor mlt_image_s::close |
int mlt_image_s::colorspace |
void* mlt_image_s::data |
mlt_image_format mlt_image_s::format |
int mlt_image_s::height |
uint8_t* mlt_image_s::planes[MLT_IMAGE_MAX_PLANES] |
mlt_destructor mlt_image_s::release_alpha |
mlt_destructor mlt_image_s::release_data |
int mlt_image_s::strides[MLT_IMAGE_MAX_PLANES] |
int mlt_image_s::width |