Platforms to show: All Mac Windows Linux Cross-Platform
Back to WindowsBitmapMBS module.
WindowsBitmapMBS.BitmapToDIB(HBitmap as Ptr, HPalette as Ptr = nil) as Ptr
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Picture Plugin | 15.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | All |
HPalette is optional a color palette handle for images with 8 bit or less per pixel.
WindowsBitmapMBS.DeleteBitmap(HBitmap as Ptr)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Picture Plugin | 15.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | All |
You need to free the images you allocate to make sure memory is released.
WindowsBitmapMBS.DIBToBitmap(HDIB as Ptr, HPalette as Ptr = nil) as Ptr
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Picture Plugin | 15.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | All |
HPalette is optional a color palette handle for images with 8 bit or less per pixel.
Returns nil in case of no memory.
WindowsBitmapMBS.DuplicateHBitmap(HBitmap as Ptr, Width as Integer, Height as Integer) as Ptr
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Picture Plugin | 15.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | All |
Please use DeleteBitmap later to free bitmap.
WindowsBitmapMBS.HBitmapInfo(HBitmap as Ptr, byref Width as Integer, byref Height as Integer, byref WidthBytes as Integer, byref Planes as Integer, byref BitsPixel as Integer) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Picture Plugin | 15.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | All |
Returns true on success.
WindowsBitmapMBS.HBitmapToPicture(HBitmap as Ptr, UsingDraw as boolean = false) as Picture
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Picture Plugin | 15.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | All |
If UsingDraw is true, the plugin creates a new HBitmap and draws picture inside.
Else if UsingDraw is false, the plugin copies picture and mask into a new picture.
UsingDraw with false works only for 24 or 32 bit images with one plane.
See also:
WindowsBitmapMBS.HBitmapToPicture(HBitmap as Ptr, Width as Integer, Height as Integer) as Picture
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Picture Plugin | 15.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | All |
Draws the HBitmap in a new picture of the given size.
This method can be used to resize the bitmap on the fly while drawing.
See also:
WindowsBitmapMBS.PictureToHBitmap(Pic as Picture) as Ptr
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Picture Plugin | 15.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | All |
As Xojo picture's are internally HBitmaps, the plugin returns the handle of the picture.
No copy is made and you should not free the image. If you need a copy, please use DuplicateHBitmap function.
Please use DeleteBitmap later to free bitmap.
The items on this page are in the following plugins: MBS Picture Plugin.