<p>Can anyone recommend a decent C image library?</p>

<p>I'm after loaders for bmp, gif, jpg, png and tga.</p>

<p>I want to use this for programming my <strong>Sony Playstation Portable</strong>, so opensource would be very handy.</p>

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

[{'answer_id': 50090, 'author': 'Thomas Owens', 'author_id': 572, 'author_profile': 'https://Stackoverflow.com/users/572', 'pm_score': 4, 'selected': False, 'text': '<p>ImageMagick has a <a href="http://www.imagemagick.org/script/magick-wand.php" rel="noreferrer">C API to connect to its libraries</a>. There\'s also what they call a <a href="http://www.imagemagick.org/script/magick-core.php" rel="noreferrer">"low-level interface" between C and the ImageMagick libraries</a>.</p>\n'}, {'answer_id': 50091, 'author': 'Bernard', 'author_id': 61, 'author_profile': 'https://Stackoverflow.com/users/61', 'pm_score': 2, 'selected': False, 'text': '<p><a href="http://openil.sourceforge.net/" rel="nofollow noreferrer">DevIL</a> is often recommended. Whether or not it does what you want, I don\'t know.</p>\n'}, {'answer_id': 50093, 'author': 'Jim Buck', 'author_id': 2666, 'author_profile': 'https://Stackoverflow.com/users/2666', 'pm_score': 2, 'selected': False, 'text': '<p>I used <a href="http://freeimage.sourceforge.net/" rel="nofollow noreferrer">FreeImage</a> for PSP games in the past, but it was for pre-processing the data rather than in-game.</p>\n'}, {'answer_id': 79554, 'author': 'shea241', 'author_id': 14656, 'author_profile': 'https://Stackoverflow.com/users/14656', 'pm_score': 2, 'selected': False, 'text': "<p>I will second Thomas Owens's ImageMagick suggestion.  It is mind-boggling just how comprehensive the library is, and how much time it saves you in the end.</p>\n"}, {'answer_id': 98270, 'author': 'KPexEA', 'author_id': 13676, 'author_profile': 'https://Stackoverflow.com/users/13676', 'pm_score': 1, 'selected': False, 'text': '<p><a href="http://code.google.com/p/kgui/source/browse/trunk/kguiimage.cpp" rel="nofollow noreferrer">Here</a> is some code I wrote for handling images. It is in c++ ( not c ) but you should be able to easily extract the BMP and GIF load code. It\'s licensed LGPL. </p>\n\n<p>I use the libpng and jpeglib for decompressing those formats. </p>\n'}, {'answer_id': 3392463, 'author': 'AKX', 'author_id': 51685, 'author_profile': 'https://Stackoverflow.com/users/51685', 'pm_score': 5, 'selected': True, 'text': '<p>If you control the images you\'re loading, the lightest loader I know is Sean Barrett\'s awesome <a href="http://nothings.org/stb_image.c" rel="noreferrer">stb_image.c</a> (direct link to single file source code!).</p>\n\n<p>There are also other very worthwhile libraries on Sean\'s site such as a tiny TrueType rasterizer and Vorbis decompressor, btw.</p>\n\n<p>If you need OpenGL image loading that uses stb_image, I\'ll humbly point you to <a href="http://bitbucket.org/akx/soilex" rel="noreferrer">SOILex</a>...</p>\n'}, {'answer_id': 29419412, 'author': 'rise of a phoenix', 'author_id': 1676488, 'author_profile': 'https://Stackoverflow.com/users/1676488', 'pm_score': 1, 'selected': False, 'text': '<p>For one of my project, I am using <a href="http://cimg.sourceforge.net/" rel="nofollow">CImg</a> Library. It\'s very useful to start with. Moreover, they also have a decent documentations. </p>\n'}]
['https://Stackoverflow.com/questions/50079', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3180/']