GreycLab / CImg

The CImg Library is a small and open-source C++ toolkit for image processing
http://cimg.eu
Other
1.48k stars 282 forks source link

Save as base64 in a variable #346

Open TepMaster opened 2 years ago

TepMaster commented 2 years ago

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.

fractalaxy7 commented 1 year ago

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