LoadImage()
Syntax
Result = LoadImage(#Image, FileName$ [, Flags])Description
Load the specified image. If #PB_Any is used as '#Image' parameter, the new image number will be returned as 'Result'.
The image can be in BMP, icon or any other format supported by the ImagePlugin library. If the function fails, 0 is returned, else all is fine. By default, the image depth will be 24 bits (or 32 bits, if the file supports alphablending informations, like PNG and TIFF).
The optional 'Flags' parameter can be one of the following values:#PB_Image_DisplayFormat: Maps the image format to the actual desktop (screen) format, to have faster display performances. This can means color information loss, for example if the desktop is in 16 bits while the image is in 24 bits.The following commands can be used to enable automatically more image formats:
UseJPEGImageDecoder()
UsePNGImageDecoder()
UseTIFFImageDecoder()
UseTGAImageDecoder()
You can use the several other functions for acting with the loaded image:
StartDrawing() with ImageOutput() to draw on the loaded image
CopyImage() to create another image from the actual one
GrabImage() to create another image from a given area of the actual one
DrawImage() with ImageID() to draw the image on actual output channel.
DrawAlphaImage() with ImageID() to draw the image (with alpha channel) on actual output channel.
ImageGadget() for displaying image on an application window
ButtonImageGadget() for creating an image button on an application window
Note: the image size is currently limited to 8192x8192 pixels (if the available memory allow it).
Supported OS
Windows, Linux, MacOS X