Dim bmp,bmpMute As Bitmap
Dim C1 As Canvas
Dim rect1 As Rect
bmp.Initialize(File.DirAssets , "testecrop.png") ' the original bitmap
bmpMute.InitializeMutable(bmp.Width,bmp.Height) 'new mutable bitmap
C1.Initialize2(bmpMute)
Dim rectBMP As Rect
rectBMP.Initialize(0,0,bmp.Width,bmp.Height)
C1.DrawBitmap(bmp,rectBMP,rectBMP) 'to draw the original bitmap to the mutable
rect1.Initialize(5,5,50,50)
C1.DrawRect(rect1, Colors.Transparent, True, 50dip)
Dim Out1 As OutputStream
Out1 = File.OpenOutput (File.DirRootExternal , "testecrop_copy.png",False )
C1.Bitmap.WriteToStream (Out1,70,"PNG")
Out1.Close