WHY FREEIMAGE?
FreeImage is big. 500k *just* the pure FreeImage code. A little too much for just image loading functions (yes, I know it can do more, but Ogre doesn't use that anyway).
FreeImage is inflexible. You can't configure it to support just the image formats you need, you have to take all the 23 formats or die (or start hacking).
FreeImage carries with it a modified copy of libjpeg, libtiff, libpng. It also carries with it a copy of zlib and libmng. Those libraries are *required* to be used, you can't use the system-wide zlib, libjpeg, libtiff, libmng, libpng.
FreeImage has a lot of functionality that Ogre doesn't need. This is like using a excavator to hammer a nail.
The only answer to the question in subject I see is the licensing issue. FreeImage is not LGPL, which if I understand correctly is a no-no on game consoles.
If it is so, then FreeImage could be left as a option to those who want to use it, and for those who don't want it there could be an alternative image codec implementation. In fact, I propose to use by default on Linux some alternative image loading library, one of those that are already installed on most Linux distributions.
I can implement a ImageCodec that uses either one of:
- SDL_image (34k shared library, supports BMP, PPM, PCX, GIF, JPEG, PNG).
- gd (250k shared library, supports BMP, PNM (PPM/PGM/PBM), XPM, LBM, PCX, GIF, JPEG, PNG, TGA, and TIFF formats).
- maybe directly libpng/libjpeg
Then --disable-freeimage can be made default on Linux, so Ogre will work out-of-the-shelf for all Linux users.
