Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

libjpeg API and Reference [closed]

Tags:

c

libjpeg

I am having trouble finding an API that details functions calls and return values... The headers aren't exactly very clean either...

I have found tons of examples, but I'm interested in error handling (return values). Am I approaching this wrong because I'm tearing my hair out trying to find something as basic as a function list for this well known library.

like image 925
Constantin Avatar asked Feb 26 '13 23:02

Constantin


2 Answers

This question is 7 years old now, and the libjpeg project has become stagnant. However, the libjpeg-turbo project appears to be its successor, and it is backwards-compatible with the old libjpeg API.

There is some documentation in libjpeg.txt. libjpeg is a very low-level, steep-learning-curve, old school c library. To use it effectively you need to be familiar with setjmp and longjmp, c structure layouts, function pointers, and lots of other low-level C stuff. It's a bear to work with but possible to do a great deal with minimal resource usage.

The documentation is not that great. I think the authors intended that anybody using this library would be able to read through the source and figure out how the stuff works.

like image 137
NovaDenizen Avatar answered Oct 23 '22 12:10

NovaDenizen


The main API files would be jpeglib.h and jerror.h. You can find these files as part of standard Android distribution also.jpeglib.h contains all the data structures, whereas jerror.h contains all error codes with corresponding messages.

like image 35
Ganesh Avatar answered Oct 23 '22 10:10

Ganesh