Pixel Search? menu

Shout-Out

User Tag List

Results 1 to 6 of 6
  1. #1
    WhiteShizzle's Avatar Active Member
    Reputation
    17
    Join Date
    Jun 2008
    Posts
    248
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Pixel Search?

    Hey there, Im in need of a little help!

    How would you go about searching for a certain color in a screenshot?

    Many thanks

    Pixel Search?
  2. #2
    iknowuwantme's Avatar Member
    Reputation
    1
    Join Date
    Jun 2009
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First you need the color which you are searching and a color for what are you looking

    Color mycolor= new Color(0,19,20) // R G B
    Color screencolor = new Color(0,0,0);


    Then you need the robot class

    Robot robot = new Robot();

    then you use the robot class to get the pixel color from a x,y position.

    screencolor = robot.getPixelColor(arg0, arg1) // put x for arg0 and y for arg1 in

    and then you have to check if these colors are equal

    if(mycolor.equals(screencolor))
    {

    }

  3. #3
    WhiteShizzle's Avatar Active Member
    Reputation
    17
    Join Date
    Jun 2008
    Posts
    248
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What if i don't know what the coords are? (Different Screen resolutions) How can i scan the image for a certain color?

  4. #4
    rolingo's Avatar Member
    Reputation
    2
    Join Date
    Mar 2008
    Posts
    5
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    	int R = 67;
    	int G = 52;
    	int B = 60;
    
            int screenHeight = Toolkit.getDefaultToolkit().getScreenSize().height;
            int screenWidth = Toolkit.getDefaultToolkit().getScreenSize().width;
    
            int x = 0;
            int y = 0;
    
            Robot robot = new Robot();
    
            BufferedImage screenShot = robot.createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()));
    	for (y = 0; y < screenHeight; y++) {
    		for (x = 0; x < screenWidth; x++) {
    					
                            int clr =  screenShot.getRGB(x,y);
    			int  red   = (clr & 0x00ff0000) >> 16;
    			int  green = (clr & 0x0000ff00) >> 8;
    			int  blue  =  clr & 0x000000ff;
    
                                if (red == R && green == G && blue == B) {
    				robot.mouseMove(x, y);
    				System.out.println("found it!");
                                    y = screenHeight;
                                    x = screenWidth;
    
    			 }
    		    }
    	       }
    Here is an code exempel of your question, hope it helps
    Last edited by rolingo; 01-18-2010 at 02:54 PM.

  5. #5
    quify's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe there's way to get around it to read processor memory
    but doing it in java is just simply harder and prabably not as efficient too.
    But can it me done? I think the answer is positive
    not many place talks about it thou.. simply it makes you look weird.

  6. #6
    rolingo's Avatar Member
    Reputation
    2
    Join Date
    Mar 2008
    Posts
    5
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by quify View Post
    I believe there's way to get around it to read processor memory
    but doing it in java is just simply harder and prabably not as efficient too.
    But can it me done? I think the answer is positive
    not many place talks about it thou.. simply it makes you look weird.
    What? Reading an certain color from a screenshoot is very simpel in java. I think it weird to read processor memory just to find an certain color on a screenshoot

Similar Threads

  1. Autoit Monster Targeting /Pixel Search
    By d3maniacu in forum Diablo 3 Bots Questions & Requests
    Replies: 0
    Last Post: 08-16-2012, 10:06 AM
  2. D3 Item Identifier. [AutoIT] Pixel-search
    By stuffe in forum Diablo 3 Bots and Programs
    Replies: 4
    Last Post: 07-18-2012, 02:57 PM
  3. Thottbot Search Engine (MATT please read)
    By Tbone in forum Community Chat
    Replies: 13
    Last Post: 11-07-2006, 06:27 AM
  4. Search
    By Alexandria in forum World of Warcraft General
    Replies: 0
    Last Post: 08-12-2006, 07:37 PM
  5. Searching for Voice Actors/In-Game Actors
    By Örpheus in forum World of Warcraft General
    Replies: 1
    Last Post: 08-01-2006, 10:03 AM
All times are GMT -5. The time now is 09:53 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search