Пример #1
0
        static private Color inv_getColorOf(Point slot, LockedFastImage D3ScreenShot)
        {
            if (slot.X < 0 || slot.X > max_slot_x-1) throw new Exception("Invalid x parameter");
            if (slot.Y < 0 || slot.Y > max_slot_y-1) throw new Exception("Invalid y parameter");

            return D3ScreenShot[getMiddleCoordsOfSlot(slot)];
        }
Пример #2
0
        public int getNumberOfFreeInventorySlots(String module_name, bool random_sleep = true, int lowest_sleep = 100, int highest_sleep = 200)
        {
            if (!GameStateChecker.getInstance().current_game_state.ingame_flags.isinventoryOpen)
            {
                main.getInstance().writeToLog(module_name, "Can't right click on inventory. Inventory not open!");
                return(-1);
            }

            LockedFastImage l     = new LockedFastImage(Tools.D3ScreenShot());
            int             count = 0;

            for (int x = 0; x < 10; x++)
            {
                for (int y = 0; y < 6; y++)
                {
                    Point slot = new Point(x, y);
                    if (isFull(slot, l))
                    {
                        count++;
                    }
                }
            }

            return(slot_number - count);
        }
Пример #3
0
        static public bool isInTown(LockedFastImage image = null)
        {
            Point pixel  = new Point(258, 545);
            Point pixel2 = new Point(284, 546);

            Color c;

            if (image != null)
            {
                c = image[pixel];
            }
            else
            {
                c = GetColorAt(pixel);
            }

            Color c2;

            if (image != null)
            {
                c2 = image[pixel2];
            }
            else
            {
                c2 = GetColorAt(pixel2);
            }

            return(c.Name == PixelColors.getinstance().isInTown || isStashOpen(image) || c2.Name == PixelColors.getinstance().isInTown2);
        }
Пример #4
0
        public int rightClickToAllFullPositions(String module_name, bool random_sleep = true, int lowest_sleep = 100, int highest_sleep = 200)
        {
            if (!GameStateChecker.getInstance().current_game_state.ingame_flags.isinventoryOpen)
            {
                main.getInstance().writeToLog(module_name, "Can't right click on inventory. Inventory not open!");
                return(-1);
            }

            LockedFastImage l      = new LockedFastImage(Tools.D3ScreenShot());
            int             clicks = 0;

            for (int x = 0; x < 10; x++)
            {
                for (int y = 0; y < 6; y++)
                {
                    Point slot = new Point(x, y);
                    if (isFull(slot, l))
                    {
                        clicks++;
                        rightClickOnSlot(slot, random_sleep, lowest_sleep, highest_sleep);
                    }
                }
            }

            return(clicks);
        }
Пример #5
0
        public GameState()
        {
            try
            {
                setFlags();

                LockedFastImage image = new LockedFastImage(Tools.D3ScreenShot());

                if (Tools.isCharScreen_RedEnterGameButton(image))
                {
                    game_state = GameStates.CharScreen_RedEnterGameButton;
                }

                else if (Tools.isCharScreen_GrayEnterGameButton(image))
                {
                    game_state = GameStates.CharScreen_GrayEnterGameButton;
                }

                else if (Tools.isDisconnectDienst(image))
                {
                    game_state = GameStates.DisconnectDienst;
                }

                else if (Tools.isInGame(image))
                {
                    game_state = GameStates.InGame;
                }

                else if (Tools.isLoadingScreen(image))
                {
                    game_state = GameStates.LoadingScreen;
                }

                else if (Tools.isLoginLoading(image))
                {
                    game_state = GameStates.LoginLoading;
                }

                else if (Tools.isloginScreen(image))
                {
                    game_state = GameStates.LoginScreen;
                }

                else
                {
                    game_state = GameStates.Unknown;
                }

                if (game_state == GameStates.InGame)
                {
                    setFlags(image);
                }

                image.Dispose();
            }
            catch (Exception e) { game_state = GameStates.D3NotLoaded; }
        }
Пример #6
0
        static private Color inv_getColorOf(Point slot, LockedFastImage D3ScreenShot)
        {
            if (slot.X < 0 || slot.X > max_slot_x - 1)
            {
                throw new Exception("Invalid x parameter");
            }
            if (slot.Y < 0 || slot.Y > max_slot_y - 1)
            {
                throw new Exception("Invalid y parameter");
            }

            return(D3ScreenShot[getMiddleCoordsOfSlot(slot)]);
        }
Пример #7
0
        static public void writeEmtyInvColors()
        {
            LockedFastImage d3Shot = new LockedFastImage(Tools.D3ScreenShot());

            String to_file = "";
            for (int y = 0; y < max_slot_y; y++)
            {
                for (int x = 0; x < max_slot_x; x++)
                    to_file += inv_getColorOf(new Point(x, y), d3Shot).Name + " ";
                to_file += Environment.NewLine;
            }

            System.IO.File.WriteAllText(file_name, to_file);
        }
Пример #8
0
        static public bool isInGame(LockedFastImage image = null)
        {
            Point pixel = new Point(125, 598);

            Color c;

            if (image != null)
            {
                c = image[pixel];
            }
            else
            {
                c = GetColorAt(pixel);
            }

            return(c.Name == PixelColors.getinstance().isInGame);
        }
Пример #9
0
        static public void writeEmtyInvColors()
        {
            LockedFastImage d3Shot = new LockedFastImage(Tools.D3ScreenShot());

            String to_file = "";

            for (int y = 0; y < max_slot_y; y++)
            {
                for (int x = 0; x < max_slot_x; x++)
                {
                    to_file += inv_getColorOf(new Point(x, y), d3Shot).Name + " ";
                }
                to_file += Environment.NewLine;
            }

            System.IO.File.WriteAllText(file_name, to_file);
        }
Пример #10
0
        static public bool isStashOpen(LockedFastImage image = null)
        {
            Point pixel = new Point(167, 60);

            Color c;

            if (image != null)
            {
                c = image[pixel];
            }
            else
            {
                c = GetColorAt(pixel);
            }

            return(c.Name == PixelColors.getinstance().isStashOpen);
        }
Пример #11
0
        static public bool isCharScreen_GrayEnterGameButton(LockedFastImage image = null)
        {
            Point pixel = new Point(73, 262);

            Color c;

            if (image != null)
            {
                c = image[pixel];
            }
            else
            {
                c = GetColorAt(pixel);
            }

            return(c.Name == PixelColors.getinstance().isCharScreen_GrayEnterGameButton);
        }
Пример #12
0
        static public bool isLoginLoading(LockedFastImage image = null)
        {
            Point pixel = new Point(438, 401);

            Color c;

            if (image != null)
            {
                c = image[pixel];
            }
            else
            {
                c = GetColorAt(pixel);
            }

            return(c.Name == PixelColors.getinstance().isLoginLoading);
        }
Пример #13
0
        static public bool isDisconnectDienst(LockedFastImage image = null)
        {
            Point pixel = new Point(430, 381);

            Color c;

            if (image != null)
            {
                c = image[pixel];
            }
            else
            {
                c = GetColorAt(pixel);
            }

            return(c.Name == PixelColors.getinstance().isDisconnectDienst);
        }
Пример #14
0
        static public bool isloginScreen(LockedFastImage image = null)
        {
            Point pixel = new Point(278, 178);

            Color c;

            if (image != null)
            {
                c = image[pixel];
            }
            else
            {
                c = GetColorAt(pixel);
            }

            return(c.Name == PixelColors.getinstance().isloginScreen);
        }
Пример #15
0
        static public bool isDead(LockedFastImage image = null)
        {
            Point pixel = new Point(522, 502);


            Color c;

            if (image != null)
            {
                c = image[pixel];
            }
            else
            {
                c = GetColorAt(pixel);
            }

            return(c.Name == PixelColors.getinstance().isDead);
        }
Пример #16
0
        static public bool isNeedRep(LockedFastImage image = null)
        {
            Point pixel = new Point(585, 49);


            Color c;

            if (image != null)
            {
                c = image[pixel];
            }
            else
            {
                c = GetColorAt(pixel);
            }

            return(c.Name == PixelColors.getinstance().isNeedRep1 || c.Name == PixelColors.getinstance().isNeedRep2);
        }
Пример #17
0
 private void setFlags(LockedFastImage image = null)
 {
     if (image == null)
     {
         ingame_flags.inTown          = false;
         ingame_flags.needRep         = false;
         ingame_flags.isWPopen        = false;
         ingame_flags.isDead          = false;
         ingame_flags.isStashOpen     = false;
         ingame_flags.isinventoryOpen = false;
     }
     else
     {
         ingame_flags.inTown          = Tools.isInTown(image);
         ingame_flags.needRep         = Tools.isNeedRep(image);
         ingame_flags.isWPopen        = Tools.isWPopen(image);
         ingame_flags.isDead          = Tools.isDead(image);
         ingame_flags.isStashOpen     = Tools.isStashOpen(image);
         ingame_flags.isinventoryOpen = Tools.isInventoryOpen(image);
     }
 }
Пример #18
0
        public GameState()
        {
            try
            {
                setFlags();

                LockedFastImage image = new LockedFastImage(Tools.D3ScreenShot());

                if (Tools.isCharScreen_RedEnterGameButton(image))
                    game_state = GameStates.CharScreen_RedEnterGameButton;

                else if (Tools.isCharScreen_GrayEnterGameButton(image))
                    game_state = GameStates.CharScreen_GrayEnterGameButton;

                else if (Tools.isDisconnectDienst(image))
                    game_state = GameStates.DisconnectDienst;

                else if (Tools.isInGame(image))
                    game_state = GameStates.InGame;

                else if (Tools.isLoadingScreen(image))
                    game_state = GameStates.LoadingScreen;

                else if (Tools.isLoginLoading(image))
                    game_state = GameStates.LoginLoading;

                else if (Tools.isloginScreen(image))
                    game_state = GameStates.LoginScreen;

                else
                    game_state = GameStates.Unknown;

                if (game_state == GameStates.InGame)
                    setFlags(image);

                image.Dispose();
            }
            catch (Exception e) { game_state = GameStates.D3NotLoaded;}
        }
Пример #19
0
        static public bool isInventoryOpen(LockedFastImage image = null)
        {
            Point pixel = new Point(672, 61);


            Color c;
            if (image != null)
                c = image[pixel];
            else
                c = GetColorAt(pixel);

            return (c.Name == PixelColors.getinstance().isInventoryOpen);
        }
Пример #20
0
        static public bool isNeedRep(LockedFastImage image = null)
        {
            Point pixel = new Point(585, 49);


            Color c;
            if (image != null)
                c = image[pixel];
            else
                c = GetColorAt(pixel);

            return (c.Name == PixelColors.getinstance().isNeedRep1 || c.Name == PixelColors.getinstance().isNeedRep2);
        }
Пример #21
0
        static public bool isDead(LockedFastImage image = null)
        {
            Point pixel = new Point(522, 502);


            Color c;
            if (image != null)
                c = image[pixel];
            else
                c = GetColorAt(pixel);

            return (c.Name == PixelColors.getinstance().isDead);
        }
Пример #22
0
        static public bool isCharScreen_GrayEnterGameButton(LockedFastImage image = null)
        {
            Point pixel = new Point(73, 262);

            Color c;
            if (image != null)
                c = image[pixel];
            else
                c = GetColorAt(pixel);

            return (c.Name == PixelColors.getinstance().isCharScreen_GrayEnterGameButton);
        }
Пример #23
0
        static public bool isInTown(LockedFastImage image = null)
        {
            Point pixel = new Point(258, 545);
            Point pixel2 = new Point(284, 546);

            Color c;
            if (image != null)
                c = image[pixel];
            else
                c = GetColorAt(pixel);

            Color c2;
            if (image != null)
                c2 = image[pixel2];
            else
                c2 = GetColorAt(pixel2);

            return (c.Name == PixelColors.getinstance().isInTown || isStashOpen(image) || c2.Name == PixelColors.getinstance().isInTown2);
        }
Пример #24
0
 private void setFlags(LockedFastImage image = null)
 {
     if (image == null)
     {
         ingame_flags.inTown = false;
         ingame_flags.needRep = false;
         ingame_flags.isWPopen = false;
         ingame_flags.isDead = false;
         ingame_flags.isStashOpen = false;
         ingame_flags.isinventoryOpen = false;
     }
     else
     {
         ingame_flags.inTown = Tools.isInTown(image);
         ingame_flags.needRep = Tools.isNeedRep(image);
         ingame_flags.isWPopen = Tools.isWPopen(image);
         ingame_flags.isDead = Tools.isDead(image);
         ingame_flags.isStashOpen = Tools.isStashOpen(image);
         ingame_flags.isinventoryOpen = Tools.isInventoryOpen(image);
     }
 }
Пример #25
0
 public bool isFull(Point slot, LockedFastImage D3Shot)
 {
     
     return !(inv_getColorOf(slot, D3Shot).Name == inventory_free_colors[slot.X, slot.Y].Name);
 }
Пример #26
0
        static public bool isInGame(LockedFastImage image = null)
        {
            Point pixel = new Point(125, 598);

            Color c;
            if (image != null)
                c = image[pixel];
            else
                c = GetColorAt(pixel);

            return (c.Name == PixelColors.getinstance().isInGame);
        }
Пример #27
0
        static public bool isloginScreen(LockedFastImage image = null)
        {
            Point pixel = new Point(278, 178);

            Color c;
            if (image != null)
                c = image[pixel];
            else
                c = GetColorAt(pixel);

            return (c.Name == PixelColors.getinstance().isloginScreen);
        }
Пример #28
0
        public int getNumberOfFreeInventorySlots(String module_name, bool random_sleep = true, int lowest_sleep = 100, int highest_sleep = 200)
        {
            if (!GameStateChecker.getInstance().current_game_state.ingame_flags.isinventoryOpen)
            {
                main.getInstance().writeToLog(module_name, "Can't right click on inventory. Inventory not open!");
                return -1;
            }

            LockedFastImage l = new LockedFastImage(Tools.D3ScreenShot());
            int count = 0;
            for (int x = 0; x < 10; x++)
                for (int y = 0; y < 6; y++)
                {
                    Point slot = new Point(x, y);
                    if (isFull(slot, l))
                        count++;
                }

            return slot_number - count;
        }
Пример #29
0
        static public List<Point> checkImageToD3(Bitmap imageToCheck, int number_of_results = 1, int x_speedUp = 1, int y_speedUp = 1, int begin_percent_x = 0, int end_percent_x = 100, int begin_percent_y = 0, int end_percent_y = 100, int fail = 0, LockedFastImage D3 = null )
        {
            ImageChecker i;

            if (D3 != null)
            {
                i = new ImageChecker(D3, imageToCheck);
            }
            else
            {
                Bitmap b = D3ScreenShot();
                if (b == null)
                    return new List<Point>();
                i = new ImageChecker(b, imageToCheck);
            }
            return i.bigContainsSmall(number_of_results, x_speedUp, y_speedUp, begin_percent_x, end_percent_x, begin_percent_y, end_percent_y, fail);
        }
Пример #30
0
        public int readGoldFromInventory(String module_name, GameState gamestate)
        {
            try
            {
                if (!gamestate.ingame_flags.isinventoryOpen)
                {
                    main.getInstance().writeToLog(module_name, "Can't read gold. Inventory not open!");
                    return -1;
                }

                LockedFastImage d3Shot = new LockedFastImage(Tools.D3ScreenShot());

                List<GoldHelpClass> list = new List<GoldHelpClass>();
                int number_fail = 10;
                //read 0
                List<Point> p = Tools.checkImageToD3(new Bitmap(Image.FromFile("./config/Image/Common/gold_0.png")), 99, 1, 1, 68, 78, 48, 54, number_fail, d3Shot);
                foreach (Point tmp in p)
                    list.Add(new GoldHelpClass(tmp, 0));

                //read 1
                p = Tools.checkImageToD3(new Bitmap(Image.FromFile("./config/Image/Common/gold_1.png")), 99, 1, 1, 68, 78, 48, 54, number_fail, d3Shot);
                foreach (Point tmp in p)
                    list.Add(new GoldHelpClass(tmp, 1));

                //read 2
                p = Tools.checkImageToD3(new Bitmap(Image.FromFile("./config/Image/Common/gold_2.png")), 99, 1, 1, 68, 78, 48, 54, number_fail, d3Shot);
                foreach (Point tmp in p)
                    list.Add(new GoldHelpClass(tmp, 2));

                //read 3
                p = Tools.checkImageToD3(new Bitmap(Image.FromFile("./config/Image/Common/gold_3.png")), 99, 1, 1, 68, 78, 48, 54, number_fail, d3Shot);
                foreach (Point tmp in p)
                    list.Add(new GoldHelpClass(tmp, 3));

                //read 4
                p = Tools.checkImageToD3(new Bitmap(Image.FromFile("./config/Image/Common/gold_4.png")), 99, 1, 1, 68, 78, 48, 54, number_fail, d3Shot);
                foreach (Point tmp in p)
                    list.Add(new GoldHelpClass(tmp, 4));

                //read 5
                p = Tools.checkImageToD3(new Bitmap(Image.FromFile("./config/Image/Common/gold_5.png")), 99, 1, 1, 68, 78, 48, 54, number_fail, d3Shot);
                foreach (Point tmp in p)
                    list.Add(new GoldHelpClass(tmp, 5));

                //read 6
                p = Tools.checkImageToD3(new Bitmap(Image.FromFile("./config/Image/Common/gold_6.png")), 99, 1, 1, 68, 78, 48, 54, number_fail, d3Shot);
                foreach (Point tmp in p)
                    list.Add(new GoldHelpClass(tmp, 6));

                //read 7
                p = Tools.checkImageToD3(new Bitmap(Image.FromFile("./config/Image/Common/gold_7.png")), 99, 1, 1, 68, 78, 48, 54, number_fail, d3Shot);
                foreach (Point tmp in p)
                    list.Add(new GoldHelpClass(tmp, 7));

                //read 8
                p = Tools.checkImageToD3(new Bitmap(Image.FromFile("./config/Image/Common/gold_8.png")), 99, 1, 1, 68, 78, 48, 54, number_fail, d3Shot);
                foreach (Point tmp in p)
                    list.Add(new GoldHelpClass(tmp, 8));

                //read 9
                p = Tools.checkImageToD3(new Bitmap(Image.FromFile("./config/Image/Common/gold_9.png")), 99, 1, 1, 68, 78, 48, 54, number_fail, d3Shot);
                foreach (Point tmp in p)
                    list.Add(new GoldHelpClass(tmp, 9));

                return convertGoldHelpClassListToInt(list);
            }
            catch { return -1; }
        }
Пример #31
0
 public bool isFull(Point slot, LockedFastImage D3Shot)
 {
     return(!(inv_getColorOf(slot, D3Shot).Name == inventory_free_colors[slot.X, slot.Y].Name));
 }
Пример #32
0
        public int readGoldFromInventory(String module_name, GameState gamestate)
        {
            try
            {
                if (!gamestate.ingame_flags.isinventoryOpen)
                {
                    main.getInstance().writeToLog(module_name, "Can't read gold. Inventory not open!");
                    return(-1);
                }

                LockedFastImage d3Shot = new LockedFastImage(Tools.D3ScreenShot());

                List <GoldHelpClass> list = new List <GoldHelpClass>();
                int number_fail           = 10;
                //read 0
                List <Point> p = Tools.checkImageToD3(new Bitmap(Image.FromFile("./config/Image/Common/gold_0.png")), 99, 1, 1, 68, 78, 48, 54, number_fail, d3Shot);
                foreach (Point tmp in p)
                {
                    list.Add(new GoldHelpClass(tmp, 0));
                }

                //read 1
                p = Tools.checkImageToD3(new Bitmap(Image.FromFile("./config/Image/Common/gold_1.png")), 99, 1, 1, 68, 78, 48, 54, number_fail, d3Shot);
                foreach (Point tmp in p)
                {
                    list.Add(new GoldHelpClass(tmp, 1));
                }

                //read 2
                p = Tools.checkImageToD3(new Bitmap(Image.FromFile("./config/Image/Common/gold_2.png")), 99, 1, 1, 68, 78, 48, 54, number_fail, d3Shot);
                foreach (Point tmp in p)
                {
                    list.Add(new GoldHelpClass(tmp, 2));
                }

                //read 3
                p = Tools.checkImageToD3(new Bitmap(Image.FromFile("./config/Image/Common/gold_3.png")), 99, 1, 1, 68, 78, 48, 54, number_fail, d3Shot);
                foreach (Point tmp in p)
                {
                    list.Add(new GoldHelpClass(tmp, 3));
                }

                //read 4
                p = Tools.checkImageToD3(new Bitmap(Image.FromFile("./config/Image/Common/gold_4.png")), 99, 1, 1, 68, 78, 48, 54, number_fail, d3Shot);
                foreach (Point tmp in p)
                {
                    list.Add(new GoldHelpClass(tmp, 4));
                }

                //read 5
                p = Tools.checkImageToD3(new Bitmap(Image.FromFile("./config/Image/Common/gold_5.png")), 99, 1, 1, 68, 78, 48, 54, number_fail, d3Shot);
                foreach (Point tmp in p)
                {
                    list.Add(new GoldHelpClass(tmp, 5));
                }

                //read 6
                p = Tools.checkImageToD3(new Bitmap(Image.FromFile("./config/Image/Common/gold_6.png")), 99, 1, 1, 68, 78, 48, 54, number_fail, d3Shot);
                foreach (Point tmp in p)
                {
                    list.Add(new GoldHelpClass(tmp, 6));
                }

                //read 7
                p = Tools.checkImageToD3(new Bitmap(Image.FromFile("./config/Image/Common/gold_7.png")), 99, 1, 1, 68, 78, 48, 54, number_fail, d3Shot);
                foreach (Point tmp in p)
                {
                    list.Add(new GoldHelpClass(tmp, 7));
                }

                //read 8
                p = Tools.checkImageToD3(new Bitmap(Image.FromFile("./config/Image/Common/gold_8.png")), 99, 1, 1, 68, 78, 48, 54, number_fail, d3Shot);
                foreach (Point tmp in p)
                {
                    list.Add(new GoldHelpClass(tmp, 8));
                }

                //read 9
                p = Tools.checkImageToD3(new Bitmap(Image.FromFile("./config/Image/Common/gold_9.png")), 99, 1, 1, 68, 78, 48, 54, number_fail, d3Shot);
                foreach (Point tmp in p)
                {
                    list.Add(new GoldHelpClass(tmp, 9));
                }

                return(convertGoldHelpClassListToInt(list));
            }
            catch { return(-1); }
        }
Пример #33
0
        public int rightClickToAllFullPositions(String module_name, bool random_sleep = true, int lowest_sleep = 100, int highest_sleep = 200)
        {
            if (!GameStateChecker.getInstance().current_game_state.ingame_flags.isinventoryOpen)
            {
                main.getInstance().writeToLog(module_name, "Can't right click on inventory. Inventory not open!");
                return -1;
            }

            LockedFastImage l = new LockedFastImage(Tools.D3ScreenShot());
            int clicks = 0;
            for (int x = 0; x < 10; x++)
                for (int y = 0; y < 6; y++)
                {
                    Point slot = new Point(x, y);
                    if (isFull(slot, l))
                    {
                        clicks++;
                        rightClickOnSlot(slot, random_sleep, lowest_sleep, highest_sleep);
                    }
                }

            return clicks;
        }
Пример #34
0
        static public bool isDisconnectDienst(LockedFastImage image = null)
        {
            Point pixel = new Point(430, 381);

            Color c;
            if (image != null)
                c = image[pixel];
            else
                c = GetColorAt(pixel);

            return (c.Name == PixelColors.getinstance().isDisconnectDienst);
        }
Пример #35
0
 /// <summary>
 /// Constructor of the ImageChecker
 /// </summary>
 /// <param name="big_image">The image containing the small image.</param>
 /// <param name="small_image">The image located in the big image.</param>
 public ImageChecker(LockedFastImage big_image, Bitmap small_image)
 {
     this.big_image = big_image;
     this.small_image = new LockedFastImage(small_image);
 }
Пример #36
0
        static public bool isLoginLoading(LockedFastImage image = null)
        {
            Point pixel = new Point(438, 401);

            Color c;
            if (image != null)
                c = image[pixel];
            else
                c = GetColorAt(pixel);

            return (c.Name == PixelColors.getinstance().isLoginLoading);
        }
Пример #37
0
        static public List <Point> checkImageToD3(Bitmap imageToCheck, int number_of_results = 1, int x_speedUp = 1, int y_speedUp = 1, int begin_percent_x = 0, int end_percent_x = 100, int begin_percent_y = 0, int end_percent_y = 100, int fail = 0, LockedFastImage D3 = null)
        {
            ImageChecker i;

            if (D3 != null)
            {
                i = new ImageChecker(D3, imageToCheck);
            }
            else
            {
                Bitmap b = D3ScreenShot();
                if (b == null)
                {
                    return(new List <Point>());
                }
                i = new ImageChecker(b, imageToCheck);
            }
            return(i.bigContainsSmall(number_of_results, x_speedUp, y_speedUp, begin_percent_x, end_percent_x, begin_percent_y, end_percent_y, fail));
        }
Пример #38
0
 /// <summary>
 /// Constructor of the ImageChecker
 /// </summary>
 /// <param name="big_image">The image containing the small image.</param>
 /// <param name="small_image">The image located in the big image.</param>
 public ImageChecker(LockedFastImage big_image, Bitmap small_image)
 {
     this.big_image   = big_image;
     this.small_image = new LockedFastImage(small_image);
 }