What's the simplest C image library for loading and saving? I just want a 2D array to test some algorithms, and built-in functions are not needed.
+1
A:
You definitely want to look at the imagemagik c connector api. It is very easy to get going, and the linked page has some nice code samples.
And there is always the ubiquitous GD library. It is not hard to use either.
Byron Whitlock
2010-04-29 20:28:06
it looks in C++
Timmy
2010-04-29 20:33:31
No FreeImage is a pure C library, although there is a C++ version called FreeImagePlus which wraps the C structs and functions in classes.
Andreas Brinck
2010-04-29 20:34:27
+2
A:
You could also just read and write raw image RGB values to a binary file, if that is really all you need, and if you know the image size ahead of time.
bde
2010-04-29 22:09:58
That's true. BMP and TGA file formats are also very simple to parse or generate.
Judge Maygarden
2010-04-30 13:37:05
+3
A:
All these libraries are way too complicated for me. In your place I'd grit my teeth, define an abstraction for a dynamic two-dimensional array, and I'd read and write plain ASCII PNM format.
Norman Ramsey
2010-04-30 00:58:49