Dim IView As ImageView
Dim Bmap As Bitmap
Dim OStream As OutputStream
Dim OStream.InitializeToBytesArray(1)
Dim BArray(1) As Byte
IView.Initialize("Iview")
IView.Bitmap = LoadBitmap(cSomedir,"IMG1.JPG")
Bmap = IView.Bitmap
Bmap.WriteToStream(OStream,100,"PNG")
OStream.Close
BArray = OStream.ToBytesArray