开发者

Converting a BufferedImage to HBITMAP

I need to convert a Java BufferedImage into an HBITMAP.

So far I have allocated the memory needed for this operation, but I do not know what API functions I have to use to convert my BufferedImage into an hBitmap.

int width  = myImage.getWidth();
int height 开发者_运维百科= myImage.getHeight();


Pointer myImageHdc = gdi32.CreateCompatibleDC(Pointer.NULL);
Pointer myImageBitmap = gdi32.CreateCompatibleBitmap(myImageHdc, width, height);

gdi32.SelectObject(myImageHdc, myImageBitmap);

Any ideas? Thanks.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜