views:

624

answers:

3

I've incorporated LIBPNG and ZLIB into my C software for a microcontroller project due to their nicely liberal license which permits such use without requiring me to disclose any of my code (it's very similar to BSD/MIT/APACHE, but with no attribution requirement).

I'd like to look at using lossy image compression to save memory. The JPEG code I've found is either GPL, LGPL, or not C. I cannot use LGPL, because that still requires me to make it possible for users to replace the library with a newer or different version, which is not possible for this project.

I'm hoping you know of a suitable lossy image compression library. It doesn't have to be JPEG (I control both encoding and decoding) but it does have to be C, and at most BSD licensed or similar (attribution is fine).

+4  A: 

Try IJG (at ijg.org). It's high-quality JPEG code, written in C, with a BSD-style license. We've used it where I work, and are happy with it.

David Thornley
I think the library name is libjpeg.
quinmars
+5  A: 

libjpeg ILJ at is C source and liberally licensed.

http://www.ijg.org/

"We are releasing this software for both noncommercial and commercial use. Companies are welcome to use it as the basis for JPEG-related products. We do not ask a royalty, although we do ask for an acknowledgement in product literature ..."

Mike

MuVol
A: 

+1 on the Independent JPEG Group library.

  • It's in C
  • Highly portable
  • Small footprint
  • Liberally licensed
  • Highly regarded
  • Widely used
  • Stable (the last release was over 10 years ago )

Both Firefox and IE use IJG code for JPEG browsers. You can't get much better than that.

Roddy