Get bytes from HBITMAP

后端 未结 5 1873
逝去的感伤
逝去的感伤 2021-01-13 13:01

How can I get image bytes from hbitmap if I am given an HBITMAP pointer, and my application is console application. I tryed using GetDIBits which require such parameter as

5条回答
  •  日久生厌
    2021-01-13 13:13

    You can try GetBitmapBits API even from console. More here: http://msdn.microsoft.com/en-us/library/windows/desktop/dd144850%28v=vs.85%29.aspx

    Just pass HBITMAP handle and you'll get your bytes

提交回复
热议问题