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. The bitmap changes its size and depth to match that of
the loaded image.
(-> booleansenda-bitmapload-filenamekindbg-color)
name: path
kind='unknown: symbol in'(unknown unknown/mask gif gif/mask jpeg png png/mask xbm xpm bmp pict)
bg-color=#f:color%object or#fThe
kindparameter specifies the file's format:'unknown-- examine the file to determine its format'unknown/mask-- like'unknown, but seeget-loaded-mask'gif-- load a GIF bitmap file (X, Windows, Mac OS X)'gif/mask-- like'gif, but seeget-loaded-mask(X, Windows, Mac OS X)'jpeg-- load a JPEG bitmap file (X, Windows, Mac OS X)'png-- load a PNG bitmap file (X, Windows, Mac OS X)'png/mask-- like'png, but seeget-loaded-mask(X, Windows, Mac OS X)'xbm-- load an X bitmap file (X, Windows, Mac OS X); creates a monochrome bitmap'xpm-- load an XPM bitmap file (X, Windows, Mac OS X)'bmp-- load a Windows bitmap file (X, Windows, Mac OS X)'pict-- load a PICT bitmap file (Mac OS X)
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-coloris 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/maskor'png/maskis specified for the format. If the format is specified as'unknownor'pngandbg-coloris 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.