[17th May 2007]
I tend to write a lot of applications and throw-away programs in the computer graphics domain. Before now I've tended to use PPM formatted images as an import/export medium.
While the code for reading and writing PPM images is pretty easy to construct, PPM isn't the most widely supported format by graphics viewers (including web browsers, of course). So I looked around for C++ libraries that support JPEG import and export.
I wasn’t happy with what I found. The available libraries seemed to have one or more of the following show-stopping limitations:
- They were part of a much wider tool-kit or SDK and the extra baggage was a hassle
- They weren't portable e.g. only designed for Windows/MFC
- They didn't integrate well with the C++ standard library
- They could only read into and write from a particular image container class, supplied with the library
- They only allowed images to be read from and written to a particular place (i.e. a file on disk)
So if you're in need of a means to read and write JPEG images in your software, I encourage you to check out jpegxx. I've made it available under the Boost software license version 1.0 and as such, it is available for use in both closed-source and open-source applications.
If you want to compile using slam, I recommend getting version 0.2.6, which I released earlier today. It has a couple of tweaks for MSVC, Borland and GCC users.
Any and all feedback on the library is welcome!
All original content copyright© Edd Dawson.
Any opinions expressed by Edd are his own and are not necessarily shared by his employer. Or by anyone else, in fact.
All source code appearing on this website that was written by Edd Dawson is made available under the terms of the Boost software license version 1.0 unless otherwise stated or implied by the license associated with the work from which the code is derived.