Sub Camera_PictureTaken (Data() As Byte)
camera.StartPreview
Dim Myout As OutputStream
Myout.InitializeToBytesArray(0)
Myout = File.OpenOutput(File.DirRootExternal, 1.jpg, False)
Myout.WriteBytes(Data, 0, Data.Length)
Myout.Close
Dim MyPic As Bitmap
MyPic.Initialize(File.DirRootExternal, 1.jpg)
MyPic.Resize(800,600,True)
MyPic.Rotate(90)
Dim Out As OutputStream
Out.initializeToBytesArray(0)
Out = File.OpenOutput(File.DirRootExternal, 2.jpg, False)
MyPic.WriteToStream(Out, 100, "JPEG")
Out.Close
Dim Input As Map
Input.Initialize
Input.Put("IdRma",OnSiteMain.IdRMA)
Input.Put("Fic",Out.ToBytesArray)
Dim JSONGenerator As JSONGenerator
JSONGenerator.Initialize(Input)
' code to send to WS