Why is my drawer.New2() not working?

willisgt

Active Member
Licensed User
Could someone please tell me why this is producing an error?

bitmapBKG is a bitmap, and background.bmp is a 24-bit BMP.

B4X:
   ' ... background image

   bitmapBKG.New1( AppPath & "\background.bmp" )

   AddObject( "drawerBKG", "Drawer" )
   drawerBKG.New2( bitmapBKG.Value, B4PObject(5) )   '<-- error happens on this line
   
   pen.Color = cCyan   'Rgb( 0, 128, 0 )

The error is: 'Object reference not set to an instance of an object'.

I'm using ImageLib.dll v. 1.0.2860.34398.


Gary

:sign0085:
 

willisgt

Active Member
Licensed User
*sigh* It's always the little details...

:sign0161:
 

Hai-DJ

New Member
Licensed User
Longtime User
drawer.New2

Try this:

' ... background image

' make a new image with NEW2

bitmapBKG.New2(width,height)

AddObject( "drawerBKG", "Drawer" )
drawerBKG.New2( bitmapBKG.Value, B4PObject(5) )

pen.Color = cCyan 'Rgb( 0, 128, 0 )
 
Top