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

NextPrevUpTopContentsIndex

externalize-image

Function
Summary

Returns an external image containing color information from an image.

Package

graphics-ports

Signature

externalize-image gp image &key maximum-colors
important-colors &allow-other-keys
=> external-image

Arguments

gp

A CAPI pane.

image

An image.

maximum-colors

An integer or nil. The default is nil.

important-colors

An integer or nil

Values

external-image

An external image.

Description

The function externalize-image returns an external-image containing color information from image .

If maximum-colors is nil or if the screen has no palette, an external-image using all the colors in image is created.

If maximum-colors is an integer, the external-image containing image will be created using no more than that number of colors. If the image contains more than maximum-colors colors, the maximum-colors most frequently used colors will be accurately stored; the remainder will be approximated by nearest colors out of the accurate ones, using internal Color System parameters as the weighting factors for the color distance.

The value of important-color is recorded in the external-image for later use, and specifies the number of colors required to draw a good likeness of the image. The default value is the number of colors in the image.

See also

make-image-from-port
write-external-image
Drawing - Graphics Ports


CAPI User Guide and Reference Manual (Unix version) - 25 Feb 2015

NextPrevUpTopContentsIndex