Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You should be able to use the cv_bridge package to convert an image to an OpenCV cv::Mat, and from there you can use cv::imencode to encode the image into PNG format.

I'm not sure how you would pass that to a REST API, but I assume the REST library that you're using will have documentation which covers that.