copyImageToClipboard

copyImageToClipboard(image: Binary): Integer;

The copyImageToClipboard method of the Application class copies the binary image specified in the image parameter to the Windows clipboard. The image must be a .bmp, .jpg, .jp2, .tiff, .gif, .png, or enhanced meta file type image.

Except for the enhanced meta file type, JADE converts the file to a bitmap image and pastes it to the clipboard using the standard Windows clipboard style of CF_DIB. (There are no standard format types available for the other file types.)

An enhanced meta file type is added to the clipboard as a standard Microsoft Windows CF_ENHMETAFILE clipboard style.

If the image is a .png file, an additional clipboard entry is made under a non‑standard clipboard format named PNG. This format is used and accepted by some other applications.

For the Windows CF_DIB style, Microsoft Windows usually creates additional clipboard copies of the image under other styles.

If the copy to the clipboard succeeded, the returned value from the method call is zero (0).

If the copying to the clipboard fails, one of the following errors is returned. (Method failure does not generate an exception.)

The rules regarding retrieving transparent images from the clipboard are vague, and applications have different implementations. The result is that the transparency can be lost by some applications, but not by JADE. For that reason, JADE adds a PNG clipboard entry for .png files so that transparency can be always retained if that format is used.