Sign in to follow this  
Toolmaker

Loading various image types (For use with OpenGL)?

Recommended Posts

Toolmaker    967
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

Share this post


Link to post
Share on other sites
Toolmaker    967
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this