All Manuals > CAPI User Guide and Reference Manual > 22 GRAPHICS-PORTS Reference Entries

make-image-from-port Function

Summary

Makes an image out of a specified rectangle of a graphics port's contents.

Package

graphics-ports

Signature

make-image-from-port port &optional x y width height => image

Arguments
port
A graphics port.
An integer.
An integer.
width
An integer.
height
An integer.
Values
image
An image.
Description

The function make-image-from-port makes an image out of the specified rectangle of the port's contents. The default is the whole port, but a region can be specified by supplying x, y, width, and height. The default values of x and y is 0.

Normally the image is freed automatically, when port is destroyed. However there are circumstances where you need to explicitly free an image, for example when you want it to go away before the port. If the image is not freed, a memory leak occurs.

See also

externalize-image
13 Drawing - Graphics Ports


CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:44