Link to home
Start Free TrialLog in
Avatar of mannoami
mannoami

asked on

GIF/JPEG READER

I am a trainee and I have been assigned a project
which is about image comparison.  it involves reading of gif or jpeg or tiff files.  
As GD is a software which is used for such purposes. We want to develop like this but with many additions
acc to our project.

Can anyone suggest some tutorials for writing C programs for such purposes?

Basically I need to read the image file.

Thanks in advance,
mannoami.
Avatar of jonnin
jonnin

Jpg is easily read from the free jpg library. Its in C as I remember. It can read and write many other types as well, I forget the list. Gif is probably not in the list but most of the others are.  Its well written; I hacked it in about 15 min to read and write raw files (just rgb data, no header, no compression)...

Avatar of mannoami

ASKER

Jonnin,thanks for ur response.

i know bout the library. i do have it. but actualy i wanna know that how they r written like what method
should i follow to write such programs in C 4 images.

so basically i want a tutorial for such purpose.
The method is to convert raw pixel data (RGB) into a standard file format that you desire. For some formats this is just adding a header or creating a palette, while for others its very complex. The extension tells you the base type, then a header on the type will tell you the subtype (if any), and the image parameters.  

JPG for example uses discrete cosine transfer to reduce the data into regions that compress well (lots of zeros), lots of math but this algorithm is well known and much posted on the web.  Jpg 2000 uses wavelets to do the same; they get more zeros than dct, but same idea.  Wavelets are the way of the future, but intense computations are needed.
Time space tradeoff strikes again...


I don't know of many free resources here, beyond jpg's free stuff. I can recommend books if you have $$ to spend, and programming/math background to understand them (they are not easy for me to understand, I have a math minor for a reference point)...
Note that signal processing pages/books are often really about image processing!

But what you really need is a list of file formats and what goes where in them. I don't know where to get this (no one location really) ...
You will also need the compression/decompression algorithms used in many of the formats, this is avail on the web for most of them.

ASKER CERTIFIED SOLUTION
Avatar of guidway
guidway
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It isn't the tutorial you asked for, but if you start working with formats then all this has the compression/decompression info of a lot of formats.

guidway
Avatar of Kent Olsen
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question is:
Accept guidway's comment as answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Kent (Kdo)
EE Cleanup Volunteer