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 
Return to the default flat view Create a new topic Submit Reply
Re: Getting graphics output to Windows clipboard [message #11622 is a reply to message #11530] Fri, 24 April 1998 00:00 Go to previous messageGo 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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: envi_collect_spectra
Next Topic: Data Handling

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

Current Time: Fri Oct 10 09:33:58 PDT 2025

Total time taken to generate the page: 0.64187 seconds