예제 #1
0
        private void VideoImage_ImageComplete(object sender, DroneImageCompleteEventArgs e)
        {
            WriteableBitmap videoImage  = e.ImageSource as WriteableBitmap;
            Bitmap          bitmapImage = bitmapUtils.BitmapSourceToBitmap(videoImage);

            currentImage  = videoImage;
            currentBitmap = bitmapImage;
        }
예제 #2
0
        private void VideoImage_ImageComplete(object sender, DroneImageCompleteEventArgs e)
        {
            WriteableBitmap videoImage  = e.ImageSource as WriteableBitmap;
            Bitmap          bitmapImage = bitmapUtils.BitmapSourceToBitmap(videoImage);

            currentImage  = videoImage;
            currentBitmap = bitmapImage;

            /*     Bitmap bmp = new Bitmap(currentBitmap.Width/2, currentBitmap.Height/2);
             *   for (int x = 0; x < bmp.Width; x++)
             *   {
             *       for (int y = 0; y < bmp.Height; y++)
             *       {
             *           bmp.SetPixel(x, y, currentBitmap.GetPixel(x * 2, y * 2));
             *       }
             *
             *   }
             */if (NewFrame != null)
            {
                NewFrame(currentBitmap, e);
            }
        }