[Pdx-pm] Scan OSX Window pixel by pixel

Eric Wilhelm enobacon at gmail.com
Tue Mar 29 22:37:48 PDT 2011

# from Joshua Keroes
# on Tuesday 29 March 2011 21:57:

>> I have a Java window displayed on my Mac. I'd like to determine the
>> color for any arbitrary pixel in the window. Ideas on how to approach
>> this problem?
>Found a promising CPAN module, Imager::Search::Screenshot. The
>SYNOPSIS snippet this takes 12 seconds to run, a little longer than
>the fractional seconds I was aiming for. *cue sad trombone*

Do you mean Imager::Screenshot?  Imager::Search::Screenshot has no 
SYNOPSIS that I can see.

To get the color of any pixel should be rather quick with e.g. 
Image::Magick or GD.  Is getting a screenshot with Imager::Screenshot 
taking 12 seconds?

Don't worry about what anybody else is going to do. The best way to
predict the future is to invent it.
--Alan Kay

More information about the Pdx-pm-list mailing list