you can use the GetLinearAccess function to get direct pixel access.
Then you can do whatever you like with the raw image data.
You can see an example in the CVB Documentation.
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.
so basically you want to compress a CVB IMG to PNG data and send that over the net to a different PC, then decompress it there?
I do not think there is a function for that in CVB. You would have to use GetLinearAccess to do the compression on your own (maybe using libpng) and then send it over.