Obtaining image of screen [message #31776] |
Tue, 20 August 2002 11:49  |
Alan.Ling
Messages: 2 Registered: August 2002
|
Junior Member |
|
|
Hello,
I have an IDL program which creates a window containing various
widgets, including a drawing area made with WIDGET_DRAW. I can draw
something in the drawing area and save the image of what is drawn to
an array using TVRD(). What I want to do is to save the entire
window into an array as an image, not just the graphics portion of the
window, but everything in the window including all the widgets. Does
anyone know how to do this?
Thanks,
Alan Ling
|
|
|
Re: Obtaining image of screen [message #31854 is a reply to message #31776] |
Wed, 21 August 2002 07:35  |
mchinand
Messages: 66 Registered: September 1996
|
Member |
|
|
In article <571b0146.0208210503.1f9a0401@posting.google.com>,
Alan Ling <Alan.Ling@hanscom.af.mil> wrote:
> "Liam E. Gumley" <Liam.Gumley@ssec.wisc.edu> wrote in message
> I am using Irix 6.5 on a SGI O2. I was looking for a way to do it in
> IDL. I looked into spawning snapshot in my code, but snapshot doesn't
> accept any useful arguments such as the window position and size, thus
> making it clumsy to use for this purpose.
You can use xwd. You can specify either the resource ID or
WM_NAME of the window you want to capture. If you set the title of the
base widget you can use:
xwd -name 'title_of_your_base_widget' > widgetcapture.xwd
IDL can read the X Windows dump format file with READ_XWD.
Hope that helps,
--Mike
--
Michael Chinander
m-chinander@uchicago.edu
Department of Radiology
University of Chicago
|
|
|
Re: Obtaining image of screen [message #31855 is a reply to message #31776] |
Wed, 21 August 2002 07:26  |
Liam E. Gumley
Messages: 378 Registered: January 2000
|
Senior Member |
|
|
Alan Ling wrote:
>
> "Liam E. Gumley" <Liam.Gumley@ssec.wisc.edu> wrote in message news:<3D62959E.3E369C6F@ssec.wisc.edu>...
>> Alan Ling wrote:
>>> I have an IDL program which creates a window containing various
>>> widgets, including a drawing area made with WIDGET_DRAW. I can draw
>>> something in the drawing area and save the image of what is drawn to
>>> an array using TVRD(). What I want to do is to save the entire
>>> window into an array as an image, not just the graphics portion of the
>>> window, but everything in the window including all the widgets. Does
>>> anyone know how to do this?
>>
>> I don't know of any way to do this in IDL.
>>
>> However there are a number of non-IDL ways to do it, depending on your
>> host platform. What platform are you using?
>>
>> Cheers,
>> Liam.
>> Practical IDL Programming
>> http://www.gumley.com/
>
> I am using Irix 6.5 on a SGI O2. I was looking for a way to do it in
> IDL. I looked into spawning snapshot in my code, but snapshot doesn't
> accept any useful arguments such as the window position and size, thus
> making it clumsy to use for this purpose.
The 'import' utility from the ImageMagick package reads an image from
any visible X window and outputs it as an image file. If you don't have
it installed:
http://freeware.sgi.com/Installable/ImageMagick-5.4.1.html
Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
|
|
|