The
read-external-image
function returns an external image read from
file
.
transparent-color-index
specifies the index of the transparent color in the color map.
transparent-color-index
works only for images with a color map, that is, those with 256 colors or less. The default value is
nil
, meaning that there is no transparent color.
type
tells
read-external-image
that the image is in a particular graphics format. Currently the only recognised value is
:bmp
, which means the image is read as a Bitmap. Other values of
type
cause
read-external-image
to read the image according to the file type of
file
.
"bmp"
or
"dib"
mean that the image is read as a Bitmap. Other file types are handled in Operating System-specific ways. See the Graphics Ports chapter in the
LispWorks CAPI User Guide
for details. The default value of
type
is
nil
.
To see the effect of
transparent-color-index
, edit
examples/capi/graphics/images.lisp
.
Specify a non-white
:background
for the
viewer
pane. Use an image editing tool to find the transparent color index (183 in this image) and change the call to
read-external-image
like this:
(gp:read-external-image file :transparent-color-index 183)
Then compile and run the example, click the
Change...
button and select the
lwsplash.bmp
file.