load-file in bitmap%
Loads a bitmap from a file. If the bitmap is in use by a
bitmap-dc% object or a control, the bitmap file is not
loaded.
( -> boolean
send a-bitmap load-file name kind bg-color)
name : string
kind = : symbol in 'unknown'(unknown unknown/mask gif gif/mask jpeg png png/mask xbm xpm bmp pict)
bg-color = : #fcolor% object or #f
The kind parameter specifies the file's format:
'unknown -- examine the file to determine its format
'unknown/mask -- like 'unknown, but see get-loaded-mask
'gif -- load a GIF bitmap file (X, Windows, Mac OS)
'gif/mask -- like 'gif, but see get-loaded-mask (X, Windows, Mac OS)
'jpeg -- load a JPEG bitmap file (X, Windows, Mac OS)
'png -- load a PNG bitmap file (X, Windows, Mac OS)
'png/mask -- like 'png, but see get-loaded-mask (X, Windows, Mac OS)
'xbm -- load an X bitmap file (X, Windows, Mac OS); creates a monochrome bitmap
'xpm -- load an XPM bitmap file (X, Windows, Mac OS)
'bmp -- load a Windows bitmap file (X, Windows, Mac OS)
'pict -- load a PICT bitmap file (Mac OS)
An XBM image is always loaded as a monochrome bitmap. A 1-bit grayscale PNG without a mask or alpha channel is also loaded as a monochrome bitmap. An image in any other format is always loaded as a bitmap that matches the depth of the screen.
For PNG loading, if bg-color is not #f, then it is
combined with the file's alpha channel or mask (if any) while loading
the image; in this case, no separate mask bitmap is generated, even
if 'unknown/mask or 'png/mask is specified for the
format. If the format is specified as 'unknown or
'png and bg-color is not specified, the PNG file is
consulted for a background color to use for loading, and white is
used if no background color is indicated in the file.
In all PNG-loading modes, gamma correction is applied when the file
provides a gamma value, otherwise gamma correction is not
applied. The current display's gamma factor is determined by the
'|MrEd:gamma| preference (see Preferences) if it is set, or else
by the SCREEN_GAMMA environment variable if it is
defined. If the preference and environment variable are both
undefined, a platform-specific default is used.