HBitmap
BlitzMax Forums/BlitzMax Beginners Area/HBitmap
| ||
Hi, im currently try to implement a fingerprint scanner in a programm. Now one functions returns a hbitmap handle. i know this is a reference to the memoryblock where the image data is. but how can i get this image as a pixmap? createStaticPixmap needs a byte pointer and i only got the handle as integer. can anyone help me please, i'm sure this is easy but i dont get it. Local handle Print hdc Print GrCapRawImageToHandle(rawImage , width , height , hdc , Varptr handle) Local pixmap = CreateStaticPixmap(Byte Ptr(handle) , width , height , Width * 3 , PF_BGR888) DrawPixmap(pixmap , 0 , 0) 'crash ... system surface failed |
| ||
If the handle is an integer, turn it into a byte pointer with Byte Ptr(Handle) Looks like that's what you're doing. Are you sure you'd have permission to create a static pixmap pointing to memory outside of BlitzMax's realm? |
| ||
@Angel. Errrm, can you explain the Are you sure you'd have permission to create a static pixmap pointing to memory outside of BlitzMax's realm? I understand the Phrase ;) I just dont know what you mean by permission. And I wouldnt have the foggyest Idea if I had permission or not. Thou I suppose that if I dont know I cannot have. @Klass, sorry for thread stealing |
| ||
@AngelDaniel as you see i've turn it into a byte pointer during the function call CreateStaticPixmap(Byte Ptr(handle) , width , height , Width * 3 , PF_BGR888) i think it got something to do with the hbitmap struct!? I dont know how to handle such format. |