SOD C/C++ API Reference - Image Processing


sod_img sod_make_empty_image(int w, int h, int c);


Fill a sod_img object with the desired dimension and set the raw pixels data pointer to NULL unlike sod_make_image(). A NULL data pointer is usually used as a marker to identify empty images where a call to one of the processing interfaces is a no-op.


int    w

Image width.

int    h

Image height.

int    c

Total number of desired color channels (i.e 1 for grayscale image, 3 for standard BGR/RGB/YuV/HSV image).

Return Value

Filled sod_img except the raw pixels data pointer member of this structure is set to NULL.


Checkout the introduction course, the C/C++ samples on the download page or refer to the SOD Github Repository.

See also