DEMO version ! After registering you will receive a complete version.
Description
This function loads a BMP image into an array. This array can then be displayed by FGLPutBackground(). The internal representation of an image is different in 16/256/32k and 64k color mode. So if you load an image, be sure that you load it when you are in the same graphics mode as the one in which you want to display the buffer. You are advised not to change the contents of the array. But all the same : the first element contains the width of the image, the second contains the height. The following [height] elements all contain information for one scanline. To release the pointer to the array returned by FGLLoadBmp(), just assign NIL to it. If you load an image which is stored in more colors than the current color mode (for instance, an 24 bits picture in 256 color mode), for every pixel the closest match in the current palet is found. This method is, of course, dead-slow. If you don't have an optimal palet, it also mostly gives poor results.
There are two methods to load/display your images in 16 and 256 color mode. Method one is with a free palette. With this option, the palette of the image you load will be loaded instead of the current palette. This often means with 256 color images that all the colors on your screen will change. This is because different images often use different palettes. If you have never worked with palettes, look at the demo program to see what happens. Almost all graphical libraries only have this option. Unlike other libraries, Ferns' Graphics Library offers an alternative to loading a palette and (probably) changing everything that's on your screen. With Ferns' Graphics Library, you have the option to load your images with a fixed palette. When a image is loaded, every color in the image is mapped on the current palette (it finds the closest match). This means that your current screen isn't changed and you can load as many images with different palettes as you like ! If you have a near optimal palette (like the standard palette of Ferns' Graphics Library), the results will almost always be satisfactory. See the demo program to see the difference.
This function can be used only if you have set the screen to a graphic mode using FGLSetMode(). (Even though it doesn't display anything !)