Open InfeCtlll3 opened 5 years ago
Same question.
func ToBitmapBytes(bit C.MMBitmapRef) []byte convert C.MMBitmapRef
to []byte
.
But how to convert []byte
to C.MMBitmapRef
?
It's not yet implemented, this is the only options currently. https://github.com/go-vgo/robotgo/blob/b49f16ed0a323a6a4bd980e8c9a7eacc6c9e87b8/base/bmp_io_c.h#L144-L246
Hello, I'm trying to use this Lib to search blob images from a Sqlite3 db in a bigger Bitmap.
When I fetch these images from the db, they come as []byte (db store them as blobs) and I need to convert those images to C.MMBitmapRef in some way. I have tried converting them myself but had no success.
The work around I'm using is: Convert []byte to Image.image type, save it to png and then open using OpenBitmap in order to use FindBitmap.
Is there a way to convert either from []byte or Image.image type directly to C.MMBitmapRef type without having to save them to png and then openning again?
My sample code for fetching my blobs from the Database: