screencapture with PIL question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • greg

    screencapture with PIL question

    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.
  • Matimus

    #2
    Re: screencapture with PIL question

    On Jul 14, 8:11 am, greg <gregv...@gmail .comwrote:
    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


    Comment

    • Casey

      #3
      Re: screencapture with PIL question

      On Jul 14, 11:11 am, greg <gregv...@gmail .comwrote:
      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

      .
      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).

      Comment

      • Gabriel Genellina

        #4
        Re: screencapture with PIL question

        En Mon, 14 Jul 2008 12:11:55 -0300, greg <gregvika@gmail .comescribi�:
        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
        Things that spring to my mind on pywinauto, betterbatch and other stuff.


        --
        Gabriel Genellina

        Comment

        • Fredrik Lundh

          #5
          Re: screencapture with PIL question

          greg wrote:
          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>

          Comment

          Working...