예제 #1
0
        public void drawImage()
        {
            int   x_max = image.Width;
            int   y_max = image.Height;
            Color pixel_c, prev_c = pixel_c = image.GetPixel(0, 0);

            for (int i = 0; i < y_max; i++)
            {
                for (int j = 0; j < x_max; j++)
                {
                    pixel_c = image.GetPixel(j, i);

                    if (!(pixel_c.R == 255 && pixel_c.B == 255 && pixel_c.G == 255))
                    {
                        if (!pixel_c.Equals(prev_c))
                        {
                            PaintControl.changeColor(pixel_c.R, pixel_c.G, pixel_c.B);
                        }
                        Draw.dot(j, i);
                        Thread.Sleep(1);
                        prev_c = pixel_c;
                    }
                    else
                    {
                        //Thread.Sleep(100);
                    }
                }
            }
        }
예제 #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            Size = new Size(0, 0);

            Stage.openMSPaint();
            PaintControl.changeTool(Tools.STIFT);
            Thread.Sleep(100);
            //PaintControl.setBrushSize(1);

            DrawImage di = new DrawImage("C:/Users/Patrick/Desktop/test1.png");

            di.drawImage();

            Environment.Exit(0);
        }