[python-win32] screen capture and win32gui.GetDesktopWindow()

James Matthews nytrokiss at gmail.com
Thu Dec 7 04:21:29 CET 2006


Can you just call a GUI api that interfaces directly with the graphics card?

On 12/6/06, Tim Roberts <timr at probo.com> wrote:
>
> Ray Schumacher wrote:
> > I've been mulling screen capture code. I tried PIL's
> > ImageGrab().grab() (with pymedia) but find PIL's method to be pretty
> > slow, ~4grabs per second max with no other processes.
> > pymedia is pretty quick once I hand it the data.
> >
>
> How large is your screen?  A 1600x1200 true-color desktop is 8 megabytes
> worth of pixels, and it can take tens of milliseconds just to copy it
> over the PCI bus to main memory.
>
> > There has to be another way to get a copy or buffer() of the screen
> > DC's data that is faster (I hope).
> >
> > I putsed around with win32gui
> > desktop = win32gui.GetDesktopWindow()
> > dt_l, dt_t, dt_r, dt_b = win32gui.GetWindowRect(desktop)
> > but couldn't see how to get at the data via the handle.
> >
>
> You can use BitBlt to copy it to a DIB, but it's not going to be very
> convenient to work with.
>
> --
> Tim Roberts, timr at probo.com
> Providenza & Boekelheide, Inc.
>
> _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>



-- 
http://www.goldwatches.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20061206/90a1e1e8/attachment.htm 


More information about the Python-win32 mailing list