Results 1 to 4 of 4
Hi
I would like to get the pixel color from screen at (320,240) and if the color = 0xFFFFFFFF , i would like to execute a command.
thanks for help...
- 11-25-2010 #1Just Joined!
- Join Date
- Nov 2010
- Posts
- 1
Get Pixel Color from screen in bash script
Hi
I would like to get the pixel color from screen at (320,240) and if the color = 0xFFFFFFFF , i would like to execute a command.
thanks for help
- 11-25-2010 #2Linux Newbie
- Join Date
- Mar 2010
- Posts
- 121
- 11-26-2010 #3Just Joined!
- Join Date
- Nov 2006
- Posts
- 21
Take a screen shot, then open it with GIMP...
use the colour select tool and click on the pixel you want, then click on the foreground/background colour tool to get details of the new foreground colour. It's in html format, so you'll need to convert to whatever language you are using.
- 11-27-2010 #4Just Joined!
- Join Date
- Feb 2007
- Posts
- 1
Use external custom program
Best thing I could think of is write an external C/C++program that takes coordinates as an arguments and prints pixel color on stdout.
This C/C++ program may require to use XLib or whatever window manager OS is using.


Reply With Quote
