Someone knows a lightweight image library?

Started by
11 comments, last by cignox1 15 years, 10 months ago
I already took a look to SDL_Image and DevIL, but the first one requires SDL to be used and the second one is a bit huge for my needs. This is what I ask for: -Load/Save of a few 24/32 bit image format (bmp, tga and jpg would be enough) -Load/Save of most common high dynamic range formats -Free for any use I don't need image processing capabilities. I will consider simple scaling or blurring filters a plus, but nothing more. The library should be as lightweight as possible... Thank you!
Advertisement
I assume you want a library for C++/OpenGL? If so, SOIL might be what you're looking for.
-------------Please rate this post if it was useful.
Thank you, I forgot to say that I need a c++ libray. But I won't use it with OpenGL. It is for my raytracer, to load the textures and save the renders, so I would like this library to be independent from any other library (except the tools required to handle specific formats, like i.e. the ILM lib to load HDR files).
FreeImagePlus - a C++ wrapper for FreeImage.

This is really all there is to it. Simple but powerful.
Quote:Original post by Ashkan
FreeImagePlus - a C++ wrapper for FreeImage.

This is really all there is to it. Simple but powerful.


Thank you, it seems interesting! I'll give it a look :-)

Of course, I'm still open to other alternatives!

Thank you again!
corona loads pretty much anything in any format you wish for (with automatic internal format conversion if you want it).

// load some TGA and make sure it is in memory as 4-byte RGBAcorona::Image *image = corona::OpenImage("img.tga", corona::PF_R8G8B8A8);unsigned char *data = (unsigned char*)image->getPixels();delete image; // corona automatically Just Works (tm) with smart points because of this

(I slightly forgot the actual names/params of the functions, but it looks like that in general - just check the API docs)
Corona would be a nice alternative, but the documentation says that it only supports a PNG and TGA as writing formats. In addition, it doesn't support HDR formats, wich are pretty much a requirement when my RT will implement some more features...
Thank you anyway!
You can take a look at GIL which was recently added to Boost. Though I guess it's not what you would call lightweight... [smile]
GIL is really a framework for writing generic image processing code, rather than an image loading library.

It is incredibly cool though. Bit under-documented, but an amazing idea.
[size="1"]
Quote:Original post by Promethium
You can take a look at GIL which was recently added to Boost. Though I guess it's not what you would call lightweight... [smile]


Nice idea, but not what I need, though I suppose that someone could use it to write an image editing program...

This topic is closed to new replies.

Advertisement