No pointer to .BITMAP\bmBits with #PB_Image_DisplayFormat
Posted: Wed Apr 29, 2009 9:22 am
For images created with #PB_Image_DisplayFormat, you'll get no pointer to the .BITMAP\bmBits bit values for the bitmap...
Why? Is it a PB Bug?
Why? Is it a PB Bug?
Code: Select all
Procedure.l GetDIBSection (ImgID.i)
If GetObject_(ImageID(ImgID), SizeOf(DIBSECTION), ds.DIBSECTION )
Debug ""
Debug "Image Nr: " + Str(ImgID)
Debug "Width x Height: " + StrU(ds\dsBm\bmWidth, #PB_Long) + ", " + StrU(ds\dsBm\bmHeight, #PB_Long)
Debug "BitsPixel: " + Hex(ds\dsBm\bmBitsPixel)
Debug "ImageSize: " + StrU(ds\dsBmih\biSizeImage, #PB_Long)
Debug "-> BitmapPixel Location: " + Hex(ds\dsBm\bmBits)
EndIf
EndProcedure
If ExamineDesktops()
Debug "DesktopDepth : " + Str(DesktopDepth(0))
EndIf
CreateImage(1, 64, 64, 24)
CreateImage(2, 64, 64, 32)
CreateImage(3, 64, 64, #PB_Image_DisplayFormat)
Debug "ImageDepth 1: " + Str(ImageDepth(1)) + " bit"
Debug "ImageDepth 2: " + Str(ImageDepth(2)) + " bit"
Debug "ImageDepth 3: " + Str(ImageDepth(3)) + " bit"
GetDIBSection(1)
GetDIBSection(2)
GetDIBSection(3)