コード例 #1
0
 private void RefreshStillImage()
 {
     if (ImageProcesser.ImageLoadState == ImageProcesser.LoadState.Still)
     {
         ImageProcesser.DisposeWorkingBitmap();
         ImageProcesser.WorkingBitmap = ImageProcesser.CropBitmap(ImageProcesser.LoadedStillBitmap, ImageProcesser.ImageRect);
         ContentBitmap = MatrixFrame.CreateBitmapSourceFromBitmap(ImageProcesser.WorkingBitmap);
         MatrixFrame.BitmapToFrame(ImageProcesser.WorkingBitmap, ImageProcesser.InterpMode);
         //FrameToPreview();
         //SerialManager.PushFrame();
     }
 }
コード例 #2
0
 private void GifTimer_Tick(object sender, EventArgs e)
 {
     ImageProcesser.DisposeWorkingBitmap();
     if (_gifFrameIndex >= ImageProcesser.LoadedGifFrameCount - 1)
     {
         _gifFrameIndex = 0;
     }
     else
     {
         _gifFrameIndex++;
     }
     ImageProcesser.LoadedGifImage.SelectActiveFrame(ImageProcesser.LoadedGifFrameDim, _gifFrameIndex);
     ImageProcesser.WorkingBitmap = ImageProcesser.CropBitmap(new Bitmap(ImageProcesser.LoadedGifImage), ImageProcesser.ImageRect);
     ContentBitmap = MatrixFrame.CreateBitmapSourceFromBitmap(ImageProcesser.WorkingBitmap);
     MatrixFrame.BitmapToFrame(ImageProcesser.WorkingBitmap, ImageProcesser.InterpMode);
     ImageProcesser.DisposeWorkingBitmap();
     //SerialManager.PushFrame();
 }
コード例 #3
0
        private void RefreshGifImages()
        {
            if (ImageProcesser.ImageLoadState == ImageProcesser.LoadState.Gif)
            {
                ImageProcesser.DisposeWorkingBitmap();

                if (GifPlayPause != true) //if gif is not playing
                {
                    if (_gifFrameIndex > ImageProcesser.LoadedGifFrameCount - 1)
                    {
                        _gifFrameIndex = 0;
                    }

                    ImageProcesser.WorkingBitmap = ImageProcesser.CropBitmap(new Bitmap(ImageProcesser.LoadedGifImage), ImageProcesser.ImageRect);
                    ContentBitmap = MatrixFrame.CreateBitmapSourceFromBitmap(ImageProcesser.WorkingBitmap);
                    MatrixFrame.BitmapToFrame(ImageProcesser.WorkingBitmap, ImageProcesser.InterpMode);
                    //FrameToPreview();
                    //SerialManager.PushFrame();
                }
            }
        }