Electronic copy-and-paste can be done at very high quality if you understand what is going on. There are some trade-offs which must be considered. This discussion focuses on using the Windows clipboard, but the considerations are general and apply equally well to the Macintosh or UNIX.
When an application such as NUTS transfers the screen information into the clipboard, it has two methods of doing the transfer: Copy the screen bitmap to a section of computer memory or record the drawing instructions for the displayed picture to memory. In both cases, control of that memory is transferred to the clipboard. For a bitmap, the clipboard object consists of pixels stored at the density of the display device (the monitor), each pixel being assigned a color. In black and white, this reduces to the pixel being turned on or off. If you make the window full screen before capture (a good idea to get the most bits into the bitmap), the bitmap will have the resolution equal to the resolution of your monitor (commonly in the range of 800x600 to 1280x1024). The higher the resolution of the initial graphics device, the bigger the bitmap object that is created and the better its resolution.
The second method creates an object in the clipboard consisting of draw instructions for reproducing the picture from which it was created, such as NMR data-point-to-data-point line draw operations. The resulting object is at the resolution of the source data, usually much higher than that of the screen. This is called a Metafile in Windows and a PICT on a Macintosh. This will usually be the preferred way to copy NMR spectra.
There is a catch here,
though. Metafiles list the coordinates as integers.
This can create roundoff errors, resulting in a distorted spectrum. See comments below.![]()
The object captured from the source program can be pasted into other applications, such as a word processing program. Each application takes the object from the clipboard and displays it on the computer screen and, perhaps more important, prints it to another graphics device (the printer). Most word processing applications allow the clipboard object to be resized to fit the desired space in the report. In the case of a bitmap, this involves two complicated processes of taking a bitmap of one resolution, stretching or shrinking it in both directions, and then displaying this bitmap at the two different resolutions of the computer screen and the printer. The resulting picture may be fuzzy and may have holes where pixels don't line up.
Most word processing applications support Metafile (or PICT) clipboard objects, making display and resizing of the object much easier. All the application has to do is play back the draw operations into the resized area for the pasted picture. To print the report to a printer, the word processing application can simply play the draw operations to the printer at the printers resolution. This is much simpler than translating bitmaps from one size to another and results is much less distortion of the clipboard object. Because the Metafile can contain more information about the spectrum than a screen bitmap, the Metafile can be much larger. It has better resolution, but it can take a very long time to display the picture in a report. Many word processors can display the picture as a blank frame placeholder while editing. This way the frame of the picture is displayed and the word processing operator does not have to wait for the drawing of the clipboard object.
When
a metafile is copied to the clipboard, the coordinates are expressed as integers (because
you can't have a fraction of a pixel) and this can cause roundoff errors if the number of
points in the spectrum being copied exceeds the number of pixels. When the resulting
metafile is pasted into the target application and stretched, distortion can result.
The logical solution is to create the metafile at higher digital resolution.
This is done by using a "Printer Device Context" which means that the metafile
is composed at the digital resolution of the printer rather than the lower screen
resolution. Most common printers are 300 or 600 dpi, but you can install a printer driver
that has much higher resolution (> 2000 dpi), even though you don't actually have such
a printer. Add a "printer" (such as a Linotronic) on your computer whose
designated destination is FILE rather than a printer port, and select this printer from
inside NUTS (File/Printer setup). Then choose "Copy Printer DC Enhanced
Metafile to Clipboard" from the Edit menu. When pasted,
the image should be essentially free of distortion. Note that many applications, such as
Word, allow you to edit a pasted metafile, but to do this, the application converts it to
its own internal graphics object, and this may re-create the very roundoff problem we had
avoided.
We have recently (September, 2003)
noticed that the procedure described above no longer yields high quality
spectra in Word or PowerPoint. If you display the resulting spectrum
at 500% scale, the distortion is obvious. We assume changes in newer
versions of Office or perhaps Windows are responsible. There is a
work-around. NUTS allows copy the metafile to a file, rather than to
the clipboard. Save the spectrum to a file, then use Insert/Picture
from file to place the spectrum into the document. This Word
doc illustrates the different results using copy and paste vs. saving
to a file and inserting.
An added complication is that the target application into which the spectrum is pasted also affects the final image quality. Using the higher resolution printer device context solves the roundoff problem when pasting into Word or PageMaker. But pasting the very same copied spectrum into Publisher or PowerPoint still gives a spectrum distorted by roundoff. Some sort of conversion is apparently taking place when Paste is executed.
It is difficult to illustrate on a web page the distortion caused by this round-off error and the differences in image quality obtained by copying at different resolutions, because inserting in a web page modifies the images. To see a comparison, download this Word doc.
If the size of the figure is reduced after pasting, font sizes can become too small to read easily. The font sizes selected in NUTS assume a final plot size of 8.5x11, and become proportionately smaller as the pasted image is shrunk. This problem can be minimized by choosing a smaller target print size in NUTS using the File/Printer Setup dialog box. One choice is 6.75" envelope, which causes the pasted image to be much smaller than full page, reducing the resizing which must be done after pasting, and so reducing font shrinkage. This assumes copy with a Printer Device Context.
Another method of incorporating spectra into reports is to print to a file. Create a printer, such as an HPGL or postscript printer, on your computer whose designated destination is FILE, rather than a printer port. Select this as the printer from inside NUTS, and when you print, you will be prompted for a file name. The file can then be imported from within a word processing program or other application. How well this works is dependent on the import filter of the program into which the file is imported.
Acorn
NMR Inc.
7670 Las Positas Rd
Livermore, CA 94551
(925)456-1020
FAX (925)456-1024
Last updated: 09/17/03