Capture Pixels on any Display

2 views
Skip to first unread message

David E Blanton

unread,
Feb 15, 2012, 12:26:18 PM2/15/12
to quart...@lists.apple.com
Here is what I am trying to do.

My users may scan a thread color say Robinson Anton Poly 40, by wrapping the thread around some cardboard stock and then placing this on the scanner bed. As you might imagine there will variations in the color due to the thread being wrapped … peaks , valleys, reflections, etc.

Now we want to bring that thread color into our embroidery program. The scanned image may be on any connected display.

I want to capture a rect centered on the point where the user clicked so I can get a best fit for the color.

This is easy to do on Windows using the SetCapture() functions which directs all events to my app.

How do I get this accomplished on OSX?

-koko


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (Quart...@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/quartz-dev/quartz-dev-garchive-50095%40googlegroups.com

This email sent to quartz-dev-g...@googlegroups.com

David Duncan

unread,
Feb 15, 2012, 1:34:19 PM2/15/12
to David E Blanton, quart...@lists.apple.com
On Feb 15, 2012, at 9:26 AM, David E Blanton wrote:

> I want to capture a rect centered on the point where the user clicked so I can get a best fit for the color.
>

> How do I get this accomplished on OSX?


CGWindow APIs (10.5+) or CGDisplayCreateImageForRect() (10.6+). The latter are preferred if you can require 10.6 or later. See the SonOfGrab sample for an example of the former.
--
David Duncan

Reply all
Reply to author
Forward
0 new messages