Loading various image types (For use with OpenGL)?

Started by
3 comments, last by Toolmaker 15 years, 4 months ago
For my day job I work on an application that uses OpenGL for rendering it's 3D contents. At this moment, I'm working on functionality to adds the ability to work with bitmaps aswell. Most of the code works, but is based around Microsoft's IPicture interface to load the images from disk, and then use GetPixel on it. This is extremely slow, and won't allow me much to ease of it. I'm looking for a library, preferably NOT *LGPL*. GPL is out of the question completely as this is a commercial application. So, devIL is out of the question for now because it requires to provide the source code for it, which we rather wouldn't(because this would increase the size of our installer). What I am loooking for is: a) A library that I can staticly link into my application without being force to opensource my application. b) A dynamic library(ie, dll) that I can link to. I prefer to get my data out in BYTE format. Any ideas on this? Toolmaker

Advertisement
GDI+?
SOIL might suit your needs, it is public domain code.
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
What formats do you need to be able to load?

Writing your own library might be better if you don't want to be restricted by licenses.
Quote:Original post by krez
SOIL might suit your needs, it is public domain code.


SOIL looks great, but unfortunately, I need to pre-process the images before sending them to the graphics card. Thanks for the tip tho, I'll keep that one bookmarked. Rate++

Quote:Original post by HomerSp
What formats do you need to be able to load?

Writing your own library might be better if you don't want to be restricted by licenses.


We want to support Bitmaps, JPEGs, PNGs, GIFs, and perhaps even a few more. Writing custom code to load all those formats isn't very efficient.

I eventually resorted to using GD+, and I must say, I'm actually quite pleased with how easy GDI+ was to integrate with the existing MFC code base and how easy it is to access the bitmap pixels individually. Pre-processing is simple and effective.

Toolmaker

This topic is closed to new replies.

Advertisement