LoadImg

www.progui.co.uk  Top  Previous  Next

LoadImg()

Syntax

*newImage = LoadImg(Path.s, Width.l, Height.l, Flags.i)

Description

 

Loads a PNG, JPG, BMP or Icon image.

 

Path.s specifies the path and file name of the image/icon that you would like to load (for loading multiple images from the same directory, ImgPath can be used). Width.l and Height.l are the desired dimensions of the image. If Path.s points to an icon that has multiple resolution versions contained inside itself then the closest match version will be selected based on Width.l and Height.l, alternatively if Path.s is an image then the image will be resized to the specified dimensions. Width.l and Height.l can also be NULL in order to use the image/icon dimension's actual size.

 

Flags.i can be #Img_ReturnIcon in order to automatically covert the returned *newImage to an icon (HICON) if in another image format.

 

Returns a pointer to the new image data (HBITMAP) or icon (HICON), zero for failure.

 

The returned *newImage can later be destroyed when not needed anymore by using the FreeImg command.

 

Colours & Images Index