SOD C/C++ API Reference - Image Processing


Syntax

unsigned char * sod_image_to_blob(sod_img input);

Description

Convert back a sod_img object to its original raw memory (i.e. Blob) representation.

Parameters

sod_img    input

The input image to be converted. 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().

Return Value

1 to 3 bytes per pixel value of the original sod_img object is allocated & written into this memory pointer. if something goes wrong during processing (i.e. running out-of-memory), then NULL is returned instead. When done, sod_image_free_blob() must be called in order to avoid memory leaks.

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_imagesod_image_find_blobssod_hough_lines_detectsod_img_blob_save_as_pngsod_img_save_as_png.



Back