Syntax
void sod_img_set_pixel(sod_img input, int x, int y, int c, float val);
Description
Add a constant value to a pixel at the given location. This value must be set between 0..1 such as 0.7.
Parameters
sod_img input
The input image to be processed. The image can be loaded from disk using sod_img_load_from_file(), from memory (i.e. network socket) via sod_img_load_from_mem() or dynamically created via sod_make_image().
int x
The x-coordinate, in logical units, of the pixel to be set.
int y
The y-coordinate, in logical units, of the pixel to be set.
int c
float val
The constant value to be added at the target location.
Return Value
None. If the coordinate is out-of-range then this function is a no-op.
Example
Checkout the introduction course, the C/C++ samples on the download page or refer to the SOD Github Repository.
See also
sod_canny_edge_image • sod_grayscale_image • sod_img_get_layer • sod_hough_lines_detect • sod_hilditch_thin_image • sod_make_image.