Hi @TStadler, thanks for your answer.
In fact I thinking about a function “imencode” (OpenCV library).
I don’t know if CVB offers that kind of tool.
The goal will be to convert directly an IMG image into a buffer PNG ready to sent to another PC that does not know CVB (using a communication module) and will be able to display the PNG.
I can use CVB to save image on the hard disk and read PNG file contents to send it. But it would be faster to only work in memory.
I have not seen in CVB the equivalent of “imencode”, but maybe there is a way to do it. If you know it, that will help.