Snapshot+Clipboard

Y

Yves Lange

Hello,
i'm searching a method to take a snapshot and save it in a jpg, bmp or
gif file. I tried with win32api and win32con but it save the snapshot to
the clipboard, so i tried to redirect this in a file but i have some
problems while getting the IMAGE stocked in the clipboard and save it to
a file. Can somebody help me ?

Questions:
-How can i read the snapshot in the clipboard ?
-How can i take a snapshot in a different way (less difficult) ?

Thks.
 
C

Claudio Grondi

Yves said:
Hello,
i'm searching a method to take a snapshot and save it in a jpg, bmp or
gif file. I tried with win32api and win32con but it save the snapshot to
the clipboard, so i tried to redirect this in a file but i have some
problems while getting the IMAGE stocked in the clipboard and save it to
a file. Can somebody help me ?

Questions:
-How can i read the snapshot in the clipboard ?
-How can i take a snapshot in a different way (less difficult) ?

Thks.

Use PIL which on Windows supports taking snapshots of the screen.
<code>
import ImageGrab
GrabbedImage = ImageGrab.grab() # store screenshot as "RGB" Image
GrabbedImage.save("TheScreenshot.jpg") # PIL evaluates extension
</code>
For more details see:
http://effbot.org/imagingbook/imagegrab.htm
(works on Windows only)

Claudio Grondi
 
Y

Yves Lange

Claudio Grondi a écrit :
Use PIL which on Windows supports taking snapshots of the screen.
<code>
import ImageGrab
GrabbedImage = ImageGrab.grab() # store screenshot as "RGB" Image
GrabbedImage.save("TheScreenshot.jpg") # PIL evaluates extension
</code>
For more details see:
http://effbot.org/imagingbook/imagegrab.htm
(works on Windows only)

Claudio Grondi

Thks this module works well !
 
C

chemila66

Claudio said:
Use PIL which on Windows supports taking snapshots of the screen.
<code>
import ImageGrab
GrabbedImage = ImageGrab.grab() # store screenshot as "RGB" Image
GrabbedImage.save("TheScreenshot.jpg") # PIL evaluates extension
</code>
For more details see:
http://effbot.org/imagingbook/imagegrab.htm
(works on Windows only)

Claudio Grondi

In my project I need a module to do the ImageGrab's job but in linux,
so is there a linux version module by now or do you know the other module
fit for linux?

if anybody knows that, please reply me, thanks.
 

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

Forum statistics

Threads
474,266
Messages
2,571,073
Members
48,772
Latest member
Backspace Studios

Latest Threads

Top