Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

HBITMAP to cv::Mat

I have a HBITMAP variable in my hand which I read from a BMP file. I want to convert it to cv::Mat and then sav it as a .jpg file. I searched for the solution. But, none of my findings seemed to work. Would you show how to that in C++?

Ps: Reading BMP file directly with CV:Mat doesn't count. I am supposed to read it to HBITMAP.