Basic4GL uses Corona to load images.
Corona is an open source image loading library developed and maintained by Chad Austin and distributed under the ZLib license. It can be obtained from http://corona.sourceforce.net/

This (Basic4GL) distribution includes Corona as a static lib (one version for C++ Builder and one for MSVC++).
For complete source code, go to the Corona website.