Sub TakeMultiplePhotos
Try
SetState(openstate, True, VideoMode)
Wait For(cam.TakePicturesNow(MyTaskIndex, 9)) Complete (Pictures As List)
SetState(openstate, False, VideoMode)
pnlPicture.RemoveAllViews
For r = 0 To 2
For c = 0 To 2
Dim data() As Byte = Pictures.Get(r * 3 + c)
Dim bmp As Bitmap = cam.DataToBitmap(data)
Dim iv As ImageView
iv.Initialize("")
pnlPicture.AddView(iv, c * pnlPicture.Width / 3, r * pnlPicture.Height / 3, _
pnlPicture.Width / 3, pnlPicture.Height / 3)
iv.Bitmap = bmp.Resize(iv.Width, iv.Height, True)
iv.Gravity = Gravity.CENTER
Next
Next
pnlBackground.SetVisibleAnimated(100, True)
Sleep(4000)
pnlBackground.SetVisibleAnimated(500, False)
Catch
HandleError(LastException)
End Try
End Sub
Public Sub TakePicturesNow (MyTaskIndex As Int, NumberOfPictures As Int) As ResumableSub
If MyTaskIndex <> TaskIndex Then Return False
Camera.AbortCaptures
Dim builder As JavaObject = Camera.CreateCaptureBuilder
Dim SensorOrientation As Int = GetFromCameraCharacteristic("SENSOR_ORIENTATION")
Dim front As Int = 1
If getIsFrontFacingCamera Then front = -1
Dim orientation As Int = (SensorOrientation + jcamera.GetField("lastKnownOrientation") * front + 360) Mod 360
CaptureSettingMap.Put("JPEG_ORIENTATION", orientation)
SetSettingsFromMap(builder, CaptureSettingMap)
Dim result As List
result.Initialize
For i = 1 To NumberOfPictures
Camera.AddCaptureRequest(builder)
Next
For i = 1 To NumberOfPictures
Wait For Camera_PictureTaken (Data() As Byte)
result.Add(Data)
Next
StartPreview(MyTaskIndex, False)
Return result
End Sub
EREL, sorry, in what way can this list be saved? Thank youEach item in the list is an array of bytes with an image data. You need to save each one of them.