Syntax

Result = dbLoadImage(Filename.s, ImageID [, TextureFlag])

Description

If #PB_Any is used as the ImageID parameter, the new ID will be returned as 'Result'. Otherwise the value of 'Result' is the same value passed as the ImageID parameter.

This command will load a picture file as an image. The picture file must be of the BMP, JPG, TGA, DDS, DIB or PNG format. All images loaded are prepared with mipmaps if they do not already have them. TGA, DDS and PNG will retain their alpha channel data when loaded, providing the required transparency information when combined with transparency commands. A Texture Flag of zero will treat the image as a texture and load to fill a texture surface in memory. A value of one will preserve the image without adding mipmaps, scaling or filtering and so retaining its pixel perfect quality. If the value is set to two, the image is loaded as a cubemap texture, useful for shader implementation. Be aware that OS/2 bitmaps are not supported, even though they share the BMP file extension.

See Also

dbImageExist, dbDeleteImage, dbSaveImage