473,809 Members | 2,719 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Snapshot+Clipbo ard

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 2066
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.sa ve("TheScreensh ot.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.sa ve("TheScreensh ot.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.sa ve("TheScreensh ot.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
1254
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 "updatable snapshot". Inside the form there are 5 columns (fields) for data input while other fields are write protected. Data input in those 5 fields work fine if I input row by row. But, if I go to other rows and then I go back to previous rows to...
3
5999
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
2195
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
1183
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
6410
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 printing form appears other controls from the existing or new applications in the screen ( Printing.. Please wait... - form for example). I mean that "CopyFromScreen" getting all the forms in defined coordinates and does not matter that the form that...
0
10639
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10383
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5688
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.