Results 1 to 7 of 7
Hi, I need to write a program that can take snapshot of the
entire desktop, store the image data in an array and then
optionally save the array data as ...
- 04-24-2007 #1
Taking Screenshot in linux Programmatically
Hi, I need to write a program that can take snapshot of the
entire desktop, store the image data in an array and then
optionally save the array data as a Bitmap image on disk or
display it in another window.
I used to take screenshot in windows by first calling the
hdc = GetDC(GetDesktopWindow())
Then create a compatible DC and perform BitBlt().
How do i GetDesktopWindow() in linux. What about BitBlt()
Is it possible to access the display driver directly to accomplish
this?
Please help.
- 04-26-2007 #2Just Joined!
- Join Date
- Apr 2007
- Posts
- 6
imagemagick
Hi asadujjaman,
If you have imagemagick installed, you can use this command:
import -window root screenshot.png
- 04-27-2007 #3Linux Newbie
- Join Date
- Feb 2007
- Location
- hyderabad, india
- Posts
- 247
hi
"Relationships are built on trust and communication"
- 04-27-2007 #4Just Joined!
- Join Date
- Apr 2007
- Posts
- 6
It didn't give you an error message so i'm guessing the command was found and worked. Have a look in the director that you ran the command ie. 'untitledfolder' and you should see a file called screenshot.png. Open with an image editor/viewer.
- 04-29-2007 #5
I need to do it programmatically
Can anybody give me some code example or api reference?
- 04-30-2007 #6Linux Enthusiast
- Join Date
- Jul 2005
- Location
- Maryland
- Posts
- 521
- 05-06-2007 #7


Reply With Quote
