What's a good algorthim for loading images?

I need to load an image for texture-mapping onto a cube, but the tutorial I was working for only covered bitmap loading algorthims for Windows. :rolleyes: All I need is a basic, platform independent, loading function for my program so I can do texture mapping. Can anyone help?

a loader for uncompressed, true-color TGA images is very easy to realize. for the file format, go to wotsit.org

a tga basically consists of a small header (18 bytes usually) and 3widthheight bytes of color data in reversed order (BGR instead of RGB), which is not a problem, because you can call glTexImage2D(…) with a parameter GL_BGR.