Beispiel #1
0
        public VcdPerPixelAlphaForm()
        {
            InitializeComponent();
            // This form should not have a border or else Windows will clip it.
            parentForm       = null;
            localCacheBitmap = null;
            //this.StartPosition = FormStartPosition.Manual;


            //SetTargetFrameSizeAndCrop(new Size(320, 200));
            myDelegate = new UpdateBitmap(UpdateBitmapMethod);
            //autoZoom = new AutoZoom();


            Bitmap startBmp = new Bitmap(1, 1);

            using (Graphics gfx = Graphics.FromImage(startBmp))
                using (SolidBrush brush = new SolidBrush(Color.FromArgb(128, 0, 0, 0)))
                {
                    gfx.FillRectangle(brush, 0, 0, this.frameSize.Width, this.frameSize.Height);
                }
            SetBitmap(startBmp);
            UpdateFilters();
            UpdateBitmapMethod();
        }
Beispiel #2
0
    } = false;                                       //crop the image automatically



    public VcdPerPixelAlphaForm()
    {
        InitializeComponent();
        // This form should not have a border or else Windows will clip it.
        parentForm       = null;
        localCacheBitmap = null;
        //this.StartPosition = FormStartPosition.Manual;


        SetTargetFrameSizeAndCrop(new Size(320, 200));
        myDelegate = new UpdateBitmap(UpdateBitmapMethod);
    }
        public Bitmap GetImg()
        {
            Bitmap tmp = ScreenshotHelper.GetWindowCapture(PokeMMOClient);

            imgCount++;
            if (imgCount > 20)
            {
                imgCount = 0;
                GC.Collect();
            }
            ScreenshotBuffer = tmp;
            UpdateBitmap?.Invoke(this, tmp);
            return(tmp);
        }