The first thing you will need is a 3rd party libary that knows how to read .jpg header information.
For general information you can start at
jpeg.org ... one of several libraries is at
ijg.org The next step is to integrate that library with Pelles C... Which may mean creating a project and compiling the library itself.
Using the library is mostly a matter of making a folder and unpacking the files, then adding the libraries and headers to your project settings. (DO NOT add these files directly into your Pelles C\Bin folders!)
Once you have that working you should be able to manipulate just about all header and file information by calling the various functions in the library.
Since you've posted this in the "Beginner" section, I should warn you this isn't exactly beginner coding... 3rd party libraries can raise all kinds of weird issues...