Boost :: GIL How to save image in JPEG or PNG format in char *?

So, I see samples everywhere when saving to a file. But I wonder if it is possible to save in char * or a string instead of a file - so to speak, to save it in memory?

+4
source share
1 answer

There seems to be nothing that could facilitate this in the progress itself. All I / O is apparently based on the provision of file names.

However, there appears to be an extension called io_new that has input / output streams.

See the documentation here for an example (search "Reading and writing buffers in memory").

+7
source

Source: https://habr.com/ru/post/1380024/


All Articles