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 (.ico, only on Windows) or any other format supported by the ImagePlugin Library. If the function fails, 0 is returned, else all is fine. When an image is loaded, it is converted either in 24 bit (if the image depth is less or equal to 24 bit) or in 32 bit (if the image has an alpha-channel).
The following functions can be used to enable automatically more image formats:
UseJPEGImageDecoder()
UseJPEG2000ImageDecoder()
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). On Windows, if the specified image is an icon (.ico), the following commands will not be available to manipulate it: SaveImage() and @fastimage"ImageOutput()".
Supported OS
All