473,322 Members | 1,259 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Snapshot+Clipboard

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
3 2033
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
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

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Zlatko | last post by:
There is a bound form for data input in Access Project (Access front-end with SQL Server), which is based on a strored procedure (in-line function) that queries several joined tables. It is...
3
by: Bsiang Tan | last post by:
Hi all, Could anyone kindly point me the way to capture the desktop image (include the desktop icon) as bitmap ? Thank a lot Best regard, Bsiang
5
by: CC | last post by:
Dear, I have a form that is opened using a sql statement: Part of the table structure: ----------------------------------------- TbGeneral: PK - dsr_id TbDossierSample:
2
by: iwdu15 | last post by:
hi, how can i capture the screen, ex exactly what the users sees? ive looked around but any code ive found is for vb6 -- -iwdu15
2
by: sitemap | last post by:
Hello guys, I have a big problem with printing of windows.Forms :( I have application with "print" button. I am trying to use "e.Graphics.CopyFromScreen"... but in final result, over the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.