   Code to load PNG & BMP files
  Hi, can someone give me the code, or a website which has code, to load PNG and possibly BMP files. I will be using the images as textures in OpenGL so i need it to be compatible. I don't know too much about OpenGL but basically, the image data just needs to be GLubyte*.I would prefer it to load all types of PNG (whatever they are), but would settle for just transparent, compressed ones.BMP shouldn't be as hard since it's not compressed, i would like the code to load both 24 and 16-bit bitmaps but would settle for just 24.thanx   
  You can check the SOIL lib. It can load just about any image format and is compatable with OpenGL   ;SDL_image, DevIL, libpng, among others.   ;  Thanks, SOIL looks good and it can even create an ogl texture for you :)I will have to read up on how to use it but that should be simpler than putting the code in myself.   ;  What exactly are MIPmaps? Isn't it just a bunch of scaled down images that you can use instead of scaling on-the-fly? If so then i don't think i will need that, i will just draw the image texture to a quad of a certain size (it's for a 2D game).   ;  In essence they are a bunch of scaled down images and for a 2d game you only need them if you scale down your sprites (from their original size).Then again maybe some sprites will look better under rotation if you have a mipmap level on the texture but I'm not sure.   