Page 1 of 1

Customized FreeImage

Posted: Sat Aug 03, 2013 10:09 pm
by N_K
Well, this is not really a feature request for Ogre itself, but for a library it depends on. I noticed the OgreMain shared lib is quite large, even in release mode (between 5 and 8 megs, depending on the system/compiler). I decided to investigate what makes it bloated, and I came to the conclusion that the reason is FreeImage, and its plugins for all the various (and sometimes bizarre) image formats.

I think it would be nice to have a customized version of this library on the dependencies repo, with only plugins for the formats that people are actually use. I'm sure no one will ever attempt to use Dr. Halo CUT / ZSoft PCX / GIF / KOALA / etc. formats for their Ogre-powered game, yet a smaller OgreMain would be welcomed by many developers.

Re: Customized FreeImage

Posted: Sat Aug 03, 2013 10:26 pm
by masterfalcon
You've got good intentions but I don't think that we should customize the dependencies. The repo is really just a place to hold the sources, update them from time to time and provide a mechanism to build them all easily.

If someone really wants to slim it down they can always customize it for their own project.

Re: Customized FreeImage

Posted: Sun Aug 04, 2013 3:54 am
by syedhs
Yes trimming FreeImage size is the easiest way to trim down Ogremain size, and to do it is actually very simple. I don't remember the exact lines, but it doesn't take more than 5 minutes (which include compile&link).