Search code examples
cimageplaystation-portable

C Image Library


Can anyone recommend a decent C image library?

I'm after loaders for bmp, gif, jpg, png and tga.

I want to use this for programming my Sony Playstation Portable, so opensource would be very handy.

After some googleing I've found FreeImage and CImg, but both feel rather heavy, and CImg is C++ not C.


Solution

  • If you control the images you're loading, the lightest loader I know is Sean Barrett's awesome stb_image.c (direct link to single file source code!).

    There are also other very worthwhile libraries on Sean's site such as a tiny TrueType rasterizer and Vorbis decompressor, btw.

    If you need OpenGL image loading that uses stb_image, I'll humbly point you to SOILex...