By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,537 Members | 1,444 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,537 IT Pros & Developers. It's quick & easy.

Snapshot+Clipboard

P: n/a
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.
Jul 19 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Yves Lange wrote:
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
Jul 19 '06 #2

P: n/a
Claudio Grondi a écrit :
Yves Lange wrote:
>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
Thks this module works well !
Jul 19 '06 #3

P: n/a

Claudio Grondi wrote:
>
Yves Lange wrote:
>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
--
http://mail.python.org/mailman/listinfo/python-list

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.

--
View this message in context: http://www.nabble.com/Snapshot%2BCli...p20127327.html
Sent from the Python - python-list mailing list archive at Nabble.com.

Oct 23 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.