CImg icon indicating copy to clipboard operation
CImg copied to clipboard

Save as base64 in a variable

Open TepMaster opened this issue 2 years ago • 1 comments

It problem is that if you want to use the lib to make an image and send it to a remote server is impossible beavis it don't exist a function to save the data in a variable only to save it to a file.

TepMaster avatar Apr 20 '22 12:04 TepMaster

@TepMaster The jpeg_buffer plug-in allows you to store JPEGs in buffers to easily convert into Base64. Also, many programs, including Firefox, store images as temporary files (of which there is a function in the cimg:: namespace returning the temporary file directory) and then read back from them to convert the content into Base64.

fractalaxy7 avatar Jul 04 '23 15:07 fractalaxy7