It will not work the way you do
will return a BITMAP, not a byte array
You first need to convert the bitmap into a byte array
Code:
Dim out As OutputStream
out.InitializeToBytesArray(0)
dim bmp as Bitmap = img.CroppedImage
bmp.WriteToStream(out, 100, "PNG")
out.Close
Dim data() As Byte = out.ToBytesArray
and then
Code:
Dim su As StringUtils
Dim str As String = su.EncodeBase64(data)
something like that... Have not tested it