Skip to content

cf_image_save_png_to_memory

Category: image
GitHub: cute_image.h


Saves an image to a PNG in memory.

CF_Result cf_image_save_png_to_memory(CF_Image* img, void** out_data, int* out_size);
Parameters Description
img The image to save.
out_data Out parameter for the PNG data. Caller must free with cf_free.
out_size Out parameter for the size of the PNG data in bytes.

Return Value

Check the CF_Result for errors.

CF_Image
cf_image_load_png
cf_image_free
cf_image_save_png