Ejemplo n.º 1
0
        internal void OnImageAvailable(ImageReader reader)
        {
            _backgroundHandler.Post(() =>
            {
                var image = reader.AcquireNextImage();

                var buffer = image.GetPlanes()[0].Buffer;
                var length = buffer.Remaining();

                var data = new byte[length];
                buffer.Get(data);

                RaisePictureTaken(data);

                image.Close();

                RestartPreview();
            });
        }
 public void OnImageAvailable(ImageReader reader)
 {
     Owner.mBackgroundHandler.Post(new ImageSaver(reader.AcquireNextImage(), File));
 }