# LoadImage

## Description

Loads an image from a file into a specified image ID, can also be used to load an atlas texture that will be used by sub images. If loading an atlas texture a subimages.txt file must exist detailing all the images contained on it.
Image width and height must be between 1 and 2048 pixels, some devices may support larger sizes but this is not guaranteed. Images do not need to be a power of 2 in size (2,4,8,16,32,etc).
If you have lots of small images you could combine them into an atlas texture to improve performance.

## Definition

LoadImage( ID, sImageFilename, bBlackToAlpha )

void agk::LoadImage( unsigned int ID, const char *sImageFilename, int bBlackToAlpha )

integer LoadImage( sImageFilename, bBlackToAlpha )

UINT agk::LoadImage( const char* sImageFilename, int bBlackToAlpha )

integer LoadImage( sImageFilename )

UINT agk::LoadImage( const char* sImageFilename )

LoadImage( ID, sImageFilename )

void agk::LoadImage( UINT ID, const char* sImageFilename )

## Parameters

- ID - The ID to use to reference this image later.
- sImageFilename - The filename of the image to load.
- bBlackToAlpha - Set to 1 to override the image's alpha channel to be transparent where there are black pixels and opaque otherwise (default 0)