screencapture with PIL question

G

greg

I am able to use the PIL module to capture a screen or specific
window. My problem is when capturing a window (on windows XP) I can
only capture the "visible" portion of the window. Is there any way to
capture the entire window? specifically the scrolled portion of a
window that is not visible on the screen.

Thanks for any help.
 
M

Matimus

Is there any way to capture the entire window?  specifically
the scrolled portion of a window that is _not_visible_on_the_screen_.

I don't think there is. That is why it is called a _screen_ capture.

Matt
 
C

Casey

I am able to use the PIL module to capture a screen or specific
window.  My problem is when capturing a window (on windows XP) I can
only capture the "visible" portion of the window.  Is there any way to
capture the entire window?  specifically the scrolled portion of a
window that is not visible on the screen.

Thanks for any help.

You might want to check out
http://wiki.wxpython.org/index.cgi/WorkingWithImages#head-e962ac20ad55c25bc069523cd7e0246068110233
.
wxPython supports different types of device contexts including
wx.ClientDC (the client area of a window), wx.WindowDC (a specific
window), and wx.ScreenDC (anywhere or everywhere on the underlying
screen).
 
G

Gabriel Genellina

I am able to use the PIL module to capture a screen or specific
window. My problem is when capturing a window (on windows XP) I can
only capture the "visible" portion of the window. Is there any way to
capture the entire window? specifically the scrolled portion of a
window that is not visible on the screen.

Camtasia Studio -a commercial product- has a few ways to do that; one is
to send many simulated mouse clicks to the window scroll bars, capturing
the window contents in stripes.
pywinauto would help on doing that from Python
http://pywinauto.blogspot.com/
 
F

Fredrik Lundh

greg said:
I am able to use the PIL module to capture a screen or specific
window. My problem is when capturing a window (on windows XP) I can
only capture the "visible" portion of the window. Is there any way to
capture the entire window? specifically the scrolled portion of a
window that is not visible on the screen.

If we're talking arbitrary applications, that portion doesn't
necessarily exist other than as a collection of data structures deep
inside the application.

To fix this, your captura program needs to take repeated screenshots,
adjust the view between every shot, and then stitch them together. See
Gabriel's post for a link to a nice automation tool for Windows.

There are also various browser screenshot tools around that might work
in your case (I think I've seen Python code for that somewhere, but
cannot find it right now). Google can probably help.

</F>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top