comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Getting graphics output to Windows clipboard
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Getting graphics output to Windows clipboard [message #11530] Thu, 23 April 1998 00:00 Go to next message
sjh is currently offline  sjh
Messages: 4
Registered: July 1996
Junior Member
Can anyone direct me to the best way to get the contents of a graphics window
onto Windows clipboard in Win95 and WinNT? I would like to be able import such
graphics (plots and images) into other applications such as Powerpoint or
Word. Preferrably, it should be done in such as way that I can rescale the
image at the destination by rescaling the window pasted from the clipboard.

Your help woud be appreciated.

Stephen Herman
Re: Getting graphics output to Windows clipboard [message #11619 is a reply to message #11530] Fri, 24 April 1998 00:00 Go to previous message
Michael Werger is currently offline  Michael Werger
Messages: 34
Registered: May 1997
Member
Peter Mason wrote:

> ...
>
> The format that would probably suit you best is Windows Metafile. It handles
> images and line plots well, is scalable, and is understood by many Windows
> programs. Unfortunately, IDL doesn't generate this format (yet).
> If enough of us request this feature, perhaps RSI will put it in.
>
> Peter Mason

I also would favour this format because it is supported by a lot other program
like
Framemaker (for Unix!) and is the most convenient file format in this respect.
And with the new object graphics it should be quiet easy to implement it. The only

problem may be that some metafile drivers do not support every feature- thus
they (RSI) should restrict themselves to the primitives like lines, ellipsoids,
boxes, etc.
but not very sophisticated features in the metafile drivers

--
Michael Werger ------------o
ESA ESTEC & Praesepe B.V. |
Astrophysics Division mwerger@astro.estec.esa.nl|
| Postbus 299 http://astro.estec.esa.nl |
| 2200 AG Noordwijk +31 71 565 3783 (Voice)
o------------------- The Netherlands +31 71 565 4690 (FAX)
Re: Getting graphics output to Windows clipboard [message #11622 is a reply to message #11530] Fri, 24 April 1998 00:00 Go to previous message
Peter Mason is currently offline  Peter Mason
Messages: 145
Registered: June 1996
Senior Member
On Thu, 23 Apr 1998, Stephen Herman wrote:
> Can anyone direct me to the best way to get the contents of a graphics window
> onto Windows clipboard in Win95 and WinNT? I would like to be able import such
> graphics (plots and images) into other applications such as Powerpoint or
> Word. Preferrably, it should be done in such as way that I can rescale the
> image at the destination by rescaling the window pasted from the clipboard.

If you really must use the clipboard as opposed to writing printfiles,
then you could try this little suite of routines:
ftp://demsyd.syd.dem.csiro.au/pub/mmtg/idl/winclip.zip
There's one that will copy a *BITMAP* to the clipboard, given a window ID
or draw widget value. I have to say that I didn't really take things
that far with it - it's only for 8-bit display modes, and you probably
won't "achieve the desired result" if your plot uses many colours on account
of Windows' colour management.

Bitmaps really have a fixed resolution. I'd say that a bitmap format is fine
for images, but it's not ideal for line plots. Although you can resize an
imported bitmap in Word, this just effects a sub- or over-sampling of the
original picture. e.g., Resized line plots usually look pretty awful.

I recommend that you try generating your plot to a plotfile in one of IDL's
"non-raster" formats using SET_PLOT and DEVICE.
Your best bet here is probably EPS. The main problem with EPS is that you
won't be able to see your graphic within Word, not even in Print Preview.
EPS is strictly "along for the ride" in Word and Powerpoint - it's not fully
imported. But you will be able to resize it and it will print, provided
that your printer is Postscript. (It won't print on a non-Postscript
printer.)
In the past we've also used HPGL, which I think is very good for simple plots
that use few colours. Unfortunately, Office (97) doesn't seem to support it
anymore.
We've more or less avoided CGM because Word and Powerpoint used to choke on
even the simplest plots in CGM. (Well, er, also, I haven't been able import
an IDL5 CGM into Word97 successfully, although I must say that I haven't tried
that hard :-)

The format that would probably suit you best is Windows Metafile. It handles
images and line plots well, is scalable, and is understood by many Windows
programs. Unfortunately, IDL doesn't generate this format (yet).
If enough of us request this feature, perhaps RSI will put it in.


Peter Mason
Re: Getting graphics output to Windows clipboard [message #11627 is a reply to message #11530] Thu, 23 April 1998 00:00 Go to previous message
Kelly Dean is currently offline  Kelly Dean
Messages: 92
Registered: March 1997
Member
There was a Capture Graphics feature in the Windows NT/95 version of IDL 4.0 that
allowed you to do this, but RSI removed it in IDL 5.0. I still have IDL 4.0 on my
system for just this purpose, but I am beginning to use more IDL 5.0 features
which prevent me from going back to IDL 4.0 and save it in the clipboard. However,
I believe IDL 5.1 (soon to be release) will have this "clipboard" option back as
an object.

Kelly

Stephen Herman wrote:

> Can anyone direct me to the best way to get the contents of a graphics window
> onto Windows clipboard in Win95 and WinNT? I would like to be able import such
> graphics (plots and images) into other applications such as Powerpoint or
> Word. Preferrably, it should be done in such as way that I can rescale the
> image at the destination by rescaling the window pasted from the clipboard.
>
> Your help woud be appreciated.
>
> Stephen Herman
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: envi_collect_spectra
Next Topic: Data Handling

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:36:45 PDT 2025

Total time taken to generate the page: 0.00776 seconds