private void Form1_Load(object sender, EventArgs e) { OriginalBimtaps[0] = new Bitmap(ScreenRectangle.Width, ScreenRectangle.Height, PixelFormat.Format24bppRgb); OriginalBimtaps[1] = new Bitmap(ScreenRectangle.Width, ScreenRectangle.Height, PixelFormat.Format24bppRgb); Bitmap bp = new Bitmap(ScreenRectangle.Width, ScreenRectangle.Height, PixelFormat.Format8bppIndexed); bp = IP.CreateBlank(bp); SplitBitmaps[0] = IP.SplitImage(CutSize, bp); Connections(); }
public void StartTimer() { while (true) { switch (state) { case 0: state = 1; break; case 1: state = 0; break; } IP.TakeScreenShot(OriginalBimtaps[state]); SplitBitmaps[state] = IP.SplitImage(CutSize, IP.To8BPP(OriginalBimtaps[state])); PointsArray = IP.DiffPoints(SplitBitmaps[0], SplitBitmaps[1], Bios, OriginalBimtaps[state].Height, CutSize); Clones = IP.ImageClones(OriginalBimtaps[state], PointsArray, CutSize); Sender(Clones, PointsArray); Thread.Sleep(80); } }