HMD
HMD

Reputation: 2226

parse jpeg binary file

I exploring internet for two days and still can't find a good head start for this. I want to write a code with c# to get a .jpeg binary file and decode it and display the image. everywhere I looked there is lots of explanation about jpeg algorithm but still I can't find good explanation about how to parse and decode this file. I mean for example how can I know Huffman DC table starts with what number and end's with what number? I appreciate if someone can link me somewhere that I can find explanation about parsing binary jpeg file. thank you and sorry for my english.

Upvotes: 0

Views: 2994

Answers (1)

xanatos
xanatos

Reputation: 111860

Trust me, it isn't something you can do. I wouldn't touch the thing with a pole long various meters...

http://ijg.org/

Here there is the site of:

IJG is an informal group that writes and distributes a widely used free library for JPEG image compression. The first version was released on 7-Oct-1991.

There is the source code for libjpeg.

if you just want to take a look, here http://elm-chan.org/fsw/tjpgd/00index.html there is the source of

TJpgDec is a generic JPEG image decompressor module that highly optimized for small embedded systems.

it is even

Platform independent. Written in ANSI-C.

Being tiny it will be probably easy to reimplement in C# :-)

Upvotes: 5

Related Questions