The code should be almost identical. You should use ABExtDrawing.drawBitmap instead of Canvas.DrawBitmap and pass the Paint object.
I'm aware, my issue is this:
ExtDraw.drawBitmap has four variants (1, 2, 3, 4):
mCanvas, bitmap, SrcRect, DestRect, and paint (1)
mCanvas, bitmap, left (Float), right (Float), and paint (2)
mCanvas, colors() (Int), offset (int), stride (int), x (int), y (int), width (int), height (int), hasAlpha (boolean), and paint (3)
mCanvas, bitmap, Matrix (ABMatrix), and paint (4)
When I do the following (1):
Dim ExtDraw As ABExtDrawing
Dim paint As ABPaint
paint.setFilterBitmap(True)
paint.SetAntiAlias(True)
ExtDraw.drawBitmap(C, original, Null, R, paint)
return b
I get:
An error has occurred in sub: main_resizeimage (java line: 1301)
java.lang.NullPointerException
Continue?
EDIT: Nevermind, I simply had to add the following line:
After declaring paint, and then it works as expected. Thanks Erel!