If res.Success Then
Log("bmp: " & bmp.Width & " x " & bmp.Height)
Log("mask: " & res.ForegroundBitmap.Width & " x " & res.ForegroundBitmap.Height)
Dim AfterMask As B4XBitmap = RemoveMask(bmp, res.ForegroundBitmap)
ivOriginal.Bitmap = AfterMask
ivMaskSmall.Bitmap = res.ForegroundBitmap
End If