[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]

    Search the Q&A Archives

I am attempting to write JPEG decompression program. With...

<< Back to: JPEG image compression FAQ, part 1/2

Question by TxITGuy
Submitted on 8/21/2003
Related FAQ: JPEG image compression FAQ, part 1/2
Rating: Not yet rated Rate this question: Vote
I am attempting to write JPEG decompression program.  With the information I have found on the Internet, I have:
* successfully parsed the entire file
* retrieve the image dimensions, color component count, related tables, etc.
* extracted and rebuilt both Quantization tables
* extracted the raw data for all four Huffman tables (including the 16 bytes of symbol length data for each table).

Two items have me stumped though ... and don't seem to have any practical documentation on the Internet.

1.  How do I recreate the original Huffman tree from the symbol length data?

2.  Once I decompress the bit stream, how to I apply the values in the Quantization Tables to the image data?  I think I need use the Inverse Discrete Cosine Transform, which takes two inputs.  After that, I'm just guessing.


Answer by Korejwa
Submitted on 5/11/2004
Rating:  Rate this answer: Vote
Buy a copy of the "ISO DIS 10918-1" JPEG standard.  It includes flow charts that show you how to construct a Huffman tree from a DHT marker.  There is not enough free information on the web to go any further than you have gone.  (unless you study existing sourcecode)  You need the actual standard.


Your answer will be published for anyone to see and rate.  Your answer will not be displayed immediately.  If you'd like to get expert points and benefit from positive ratings, please create a new account or login into an existing account below.

Your name or nickname:
If you'd like to create a new account or access your existing account, put in your password here:
Your answer:

FAQS.ORG reserves the right to edit your answer as to improve its clarity.  By submitting your answer you authorize FAQS.ORG to publish your answer on the WWW without any restrictions. You agree to hold harmless and indemnify FAQS.ORG against any claims, costs, or damages resulting from publishing your answer.


FAQS.ORG makes no guarantees as to the accuracy of the posts. Each post is the personal opinion of the poster. These posts are not intended to substitute for medical, tax, legal, investment, accounting, or other professional advice. FAQS.ORG does not endorse any opinion or any product or service mentioned mentioned in these posts.


<< Back to: JPEG image compression FAQ, part 1/2

[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]

© 2008 FAQS.ORG. All rights reserved.