Dim p() As Int
'
p = getPixels(bmpTest1, 0, 0, 10, 10, 200, 200)
'
'
Sub getPixels(bmp As Bitmap, offset As Int, stride As Int, x As Int, y As Int, width As Int, height As Int) As Int()
Dim jo = bmp As JavaObject
Dim pixels(width * height) As Int
jo.RunMethod("getPixels", Array As Object(pixels, offset, width, x, y, width, height))
Return pixels
End Sub