Author Topic: Image Loading Library  (Read 4706 times)

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Image Loading Library
« on: 19 January 2009, 03:59:11 »
I came across the DevIL library that loads lots of image formats and supports animation.

Support for more image formats is planned in GAE v0.3

https://bugs.codemonger.org/show_bug.cgi?id=63
« Last Edit: 19 January 2009, 04:01:23 by hailstone »
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

SaiCO

  • Guest
Re: Image Loading Library
« Reply #1 on: 21 January 2009, 09:11:09 »
Hello! If I may suggest something : Ogre engine  used DevIL in past, and they ditched it in favour of FreeImage Project . Iirc problem was in licensing- freeimage is dual license :  "Use the liberal FreeImage Public License to use FreeImage commercially or the GNU General Public License to use FreeImage into your open source project" <- quote from their page.

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Image Loading Library
« Reply #2 on: 21 January 2009, 13:56:22 »
Did they ditch it because the cannot sell it as OUL License(Ogre Unlimited License) or did they ditch it because of technical problems.
DevIl is LGPL and Freelib is GPL or Commercial. Probably they made a deal with them and the only reason is the commercial side...
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

jrepan

  • Guest
Re: Image Loading Library
« Reply #3 on: 21 January 2009, 15:42:44 »
I've used ImageMagick. It is easy to use and also supports many formats.

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Image Loading Library
« Reply #4 on: 21 January 2009, 22:07:04 »
Thanks all. The licensing isn't an issue for DevIL. The size of ImageMagick might be a problem, with over 100 supported formats I'm guessing it's larger than DevIL. I will look at both before I make a decision though.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

daniel.santos

  • Guest
Re: Image Loading Library
« Reply #5 on: 30 January 2009, 19:46:22 »
Sorry to not reply to this topic sooner.  I'm in full support of an image library.  I'll leave that up to hailstone.  I personally prefer to stay in the GPL-compatible category and keep GAE fully commercially viable without royalties as it has been for some time (i.e., you can currently use the original Glest engine or GAE for a commercial game project without paying any royalties).  I don't have much of a problem with LGPL personally, I actually released some code under LGPL in the 90s.

But this brings me to another issue that really bothers me and is probably more of a lack of information/expertise on my behalf: why can't we use static linking and drop the symbols we don't use?  In reality, there are a few functions in GAE (and maybe even in GOE (Glest Original Engine? :P ), but less of them) that aren't actually used but that may get used in the future.  Is it possible to feed a list of symbols to drop, or to only include to the linker using gcc and/or ld?  If so, we could reduce the GAE's overhead.  I know that there are reasons why this can have a minimal impact -- specifically the way that modern operating systems "page in" the pages of an executable that it needs and leaves the rest memory mapped, but not actually read from disk or using any memory (so that a page fault causes it to be loaded when needed), but I still cringe at the prospect of pulling in massive libraries when I only need part of it and, alternatively, passing up more mature libraries strictly on the basis of their size.  Finally, I'm aware that by statically linking a library, you circumvent the OS's opportunity to load it as a shared library, that it can indeed *share* with other processes who use the same library.  None the less, I often wish I could pick and choose more judiciously what gets linked in.

On a related note, when I get more savvy with understanding these things, I may write a table that specifies symbol linking order so that high use functions remain clumped together, improving the chances of processor cache hits -- I'm not that good yet. :)  Sorry to drift somewhat off topic.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Image Loading Library
« Reply #6 on: 31 January 2009, 11:00:20 »
I'm all for devIL. It's a very good library with good image support. All the image formats we could really need are available from it anyway.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert