這是我選擇用於這次作業的JPEG圖檔
以下是以手動讀取Header的截圖
Baseline DCT
Define quantization tables
Reserved for application segments
Define Huffman tables
接下來是用程式讀出的數值
start: ffd8
marker: ffe0
length: 010
Application Segments
marker: ffdb
length: 043
Quantization Table:
element precision: 0
destination id: 0
elements:
2 1 1 2 1 1 2 2 2 2 2 2 2 2 3 5 3 3 3 3 3 6 4 4 3 5 7 6 7 7 7 6 7 7 8 9 11 9 8 8 10 8 7 7 10 13 10 10 11 12 12 12 12 7 9 14 15 13 12 14 11 12 12 12
marker: ffdb
length: 043
Quantization Table:
element precision: 0
destination id: 1
elements:
2 2 2 3 3 3 6 3 3 6 12 8 7 8 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12
marker: ffc0
length: 011
Frame Header:
type:
Baseline DCT
sample precision: 8 bits
height: 427 pixels
width: 640 pixels
image component: 3
The 1 Component:
component id: 1
horizontal sampling factor: 2
vertical sampling factor: 2
quantization table: 0
The 2 Component:
component id: 2
horizontal sampling factor: 1
vertical sampling factor: 1
quantization table: 1
The 3 Component:
component id: 3
horizontal sampling factor: 1
vertical sampling factor: 1
quantization table: 1
marker: ffc4
length: 01f
Huffman Table:
tc: 0
th: 0 (DC Table)
bits: 0 1 5 1 1 1 1 1 1 0 0 0 0 0 0 0
Before Value Ordering:
size: 2 3 3 3 3 3 4 5 6 7 8 9
value: 0 1 2 3 4 5 6 7 8 9 a b
code: 0 2 3 4 5 6 14 30 62 126 254 510
After Value Ordering:
size: 2 3 3 3 3 3 4 5 6 7 8 9
value: 0 1 2 3 4 5 6 7 8 9 a b
code: 0 2 3 4 5 6 14 30 62 126 254 510
marker: ffc4
length: 0b5
Huffman Table:
tc: 1
th: 0 (AC Table)
bits:
0 2 1 3 3 2 4 3 5 5 4 4 0 0 1 7d
Before Value Ordering:
size:
2 2 3 4 4 4 5 5 5 6 6 7 7 7 7 8 8 8 9 9 9 9 9 10 10 10 10 10 11 11 11 11 12 12 12 12 15 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
value:
0/1 0/2 0/3 0/0 0/4 1/1 0/5 1/2 2/1 3/1 4/1 0/6 1/3 5/1 6/1 0/7 2/2 7/1 1/4 3/2 8/1 9/1 a/1 0/8 2/3 4/2 b/1 c/1 1/5 5/2 d/1 f/0 2/4 3/3 6/2 7/2 8/2 0/9 0/a 1/6 1/7 1/8 1/9 1/a 2/5 2/6 2/7 2/8 2/9 2/a 3/4 3/5 3/6 3/7 3/8 3/9 3/a 4/3 4/4 4/5 4/6 4/7 4/8 4/9 4/a 5/3 5/4 5/5 5/6 5/7 5/8 5/9 5/a 6/3 6/4 6/5 6/6 6/7 6/8 6/9 6/a 7/3 7/4 7/5 7/6 7/7 7/8 7/9 7/a 8/3 8/4 8/5 8/6 8/7 8/8 8/9 8/a 9/2 9/3 9/4 9/5 9/6 9/7 9/8 9/9 9/a a/2 a/3 a/4 a/5 a/6 a/7 a/8 a/9 a/a b/2 b/3 b/4 b/5 b/6 b/7 b/8 b/9 b/a c/2 c/3 c/4 c/5 c/6 c/7 c/8 c/9 c/a d/2 d/3 d/4 d/5 d/6 d/7 d/8 d/9 d/a e/1 e/2 e/3 e/4 e/5 e/6 e/7 e/8 e/9 e/a f/1 f/2 f/3 f/4 f/5 f/6 f/7 f/8 f/9 f/a
code:
0 1 4 10 11 12 26 27 28 58 59 120 121 122 123 248 249 250 502 503 504 505 506 1014 1015 1016 1017 1018 2038 2039 2040 2041 4084 4085 4086 4087 8176 16354 16355 16356 16357 16358 16359 16360 16361 16362 16363 16364 16365 16366 16367 16368 16369 16370 16371 16372 16373 16374 16375 16376 16377 16378 16379 16380 16381 16382 16383 16384 16385 16386 16387 16388 16389 16390 16391 16392 16393 16394 16395 16396 16397 16398 16399 16400 16401 16402 16403 16404 16405 16406 16407 16408 16409 16410 16411 16412 16413 16414 16415 16416 16417 16418 16419 16420 16421 16422 16423 16424 16425 16426 16427 16428 16429 16430 16431 16432 16433 16434 16435 16436 16437 16438 16439 16440 16441 16442 16443 16444 16445 16446 16447 16448 16449 16450 16451 16452 16453 16454 16455 16456 16457 16458 16459 16460 16461 16462 16463 16464 16465 16466 16467 16468 16469 16470 16471 16472 16473 16474 16475 16476 16477 16478
After Value Ordering:
size:
4 2 2 3 4 5 7 8 10 16 16 4 5 7 9 11 16 16 16 16 16 5 8 10 12 16 16 16 16 16 16 6 9 12 16 16 16 16 16 16 16 6 10 16 16 16 16 16 16 16 16 7 11 16 16 16 16 16 16 16 16 7 12 16 16 16 16 16 16 16 16 8 12 16 16 16 16 16 16 16 16 9 15 16 16 16 16 16 16 16 16 9 16 16 16 16 16 16 16 16 16 9 16 16 16 16 16 16 16 16 16 10 16 16 16 16 16 16 16 16 16 10 16 16 16 16 16 16 16 16 16 11 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 11 16 16 16 16 16 16 16 16 16 16
value:
0/0 0/1 0/2 0/3 0/4 0/5 0/6 0/7 0/8 0/9 0/a 1/1 1/2 1/3 1/4 1/5 1/6 1/7 1/8 1/9 1/a 2/1 2/2 2/3 2/4 2/5 2/6 2/7 2/8 2/9 2/a 3/1 3/2 3/3 3/4 3/5 3/6 3/7 3/8 3/9 3/a 4/1 4/2 4/3 4/4 4/5 4/6 4/7 4/8 4/9 4/a 5/1 5/2 5/3 5/4 5/5 5/6 5/7 5/8 5/9 5/a 6/1 6/2 6/3 6/4 6/5 6/6 6/7 6/8 6/9 6/a 7/1 7/2 7/3 7/4 7/5 7/6 7/7 7/8 7/9 7/a 8/1 8/2 8/3 8/4 8/5 8/6 8/7 8/8 8/9 8/a 9/1 9/2 9/3 9/4 9/5 9/6 9/7 9/8 9/9 9/a a/1 a/2 a/3 a/4 a/5 a/6 a/7 a/8 a/9 a/a b/1 b/2 b/3 b/4 b/5 b/6 b/7 b/8 b/9 b/a c/1 c/2 c/3 c/4 c/5 c/6 c/7 c/8 c/9 c/a d/1 d/2 d/3 d/4 d/5 d/6 d/7 d/8 d/9 d/a e/1 e/2 e/3 e/4 e/5 e/6 e/7 e/8 e/9 e/a f/0 f/1 f/2 f/3 f/4 f/5 f/6 f/7 f/8 f/9 f/a
code: 10 0 1 4 11 26 120 248 1014 16354 16355 12 27 121 502 2038 16356 16357 16358 16359 16360 28 249 1015 4084 16361 16362 16363 16364 16365 16366 58 503 4085 16367 16368 16369 16370 16371 16372 16373 59 1016 16374 16375 16376 16377 16378 16379 16380 16381 122 2039 16382 16383 16384 16385 16386 16387 16388 16389 123 4086 16390 16391 16392 16393 16394 16395 16396 16397 250 4087 16398 16399 16400 16401 16402 16403 16404 16405 504 8176 16406 16407 16408 16409 16410 16411 16412 16413 505 16414 16415 16416 16417 16418 16419 16420 16421 16422 506 16423 16424 16425 16426 16427 16428 16429 16430 16431 1017 16432 16433 16434 16435 16436 16437 16438 16439 16440 1018 16441 16442 16443 16444 16445 16446 16447 16448 16449 2040 16450 16451 16452 16453 16454 16455 16456 16457 16458 16459 16460 16461 16462 16463 16464 16465 16466 16467 16468 2041 16469 16470 16471 16472 16473 16474 16475 16476 16477 16478
marker: ffc4
length: 01f
Huffman Table:
tc: 0
th: 1 (DC Table)
bits:
0 3 1 1 1 1 1 1 1 1 1 0 0 0 0 0
Before Value Ordering:
size:
2 2 2 3 4 5 6 7 8 9 10 11
value:
0 1 2 3 4 5 6 7 8 9 a b
code:
0 1 2 6 14 30 62 126 254 510 1022 2046
After Value Ordering:
size:
2 2 2 3 4 5 6 7 8 9 10 11
value:
0 1 2 3 4 5 6 7 8 9 a b
code:
0 1 2 6 14 30 62 126 254 510 1022 2046
marker: ffc4
length: 0b5
Huffman Table:
tc: 1
th: 1 (AC Table)
bits: 0 2 1 2 4 4 3 4 7 5 4 4 0 1 2 77
Before Value Ordering:
size:
2 2 3 4 4 5 5 5 5 6 6 6 6 7 7 7 8 8 8 8 9 9 9 9 9 9 9 10 10 10 10 10 11 11 11 11 12 12 12 12 14 15 15 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
value:
0/0 0/1 0/2 0/3 1/1 0/4 0/5 2/1 3/1 0/6 1/2 4/1 5/1 0/7 6/1 7/1 1/3 2/2 3/2 8/1 0/8 1/4 4/2 9/1 a/1 b/1 c/1 0/9 2/3 3/3 5/2 f/0 1/5 6/2 7/2 d/1 0/a 1/6 2/4 3/4 e/1 2/5 f/1 1/7 1/8 1/9 1/a 2/6 2/7 2/8 2/9 2/a 3/5 3/6 3/7 3/8 3/9 3/a 4/3 4/4 4/5 4/6 4/7 4/8 4/9 4/a 5/3 5/4 5/5 5/6 5/7 5/8 5/9 5/a 6/3 6/4 6/5 6/6 6/7 6/8 6/9 6/a 7/3 7/4 7/5 7/6 7/7 7/8 7/9 7/a 8/2 8/3 8/4 8/5 8/6 8/7 8/8 8/9 8/a 9/2 9/3 9/4 9/5 9/6 9/7 9/8 9/9 9/a a/2 a/3 a/4 a/5 a/6 a/7 a/8 a/9 a/a b/2 b/3 b/4 b/5 b/6 b/7 b/8 b/9 b/a c/2 c/3 c/4 c/5 c/6 c/7 c/8 c/9 c/a d/2 d/3 d/4 d/5 d/6 d/7 d/8 d/9 d/a e/2 e/3 e/4 e/5 e/6 e/7 e/8 e/9 e/a f/2 f/3 f/4 f/5 f/6 f/7 f/8 f/9 f/a
code:
0 1 4 10 11 24 25 26 27 56 57 58 59 120 121 122 246 247 248 249 500 501 502 503 504 505 506 1014 1015 1016 1017 1018 2038 2039 2040 2041 4084 4085 4086 4087 8176 16354 16355 32712 32713 32714 32715 32716 32717 32718 32719 32720 32721 32722 32723 32724 32725 32726 32727 32728 32729 32730 32731 32732 32733 32734 32735 32736 32737 32738 32739 32740 32741 32742 32743 32744 32745 32746 32747 32748 32749 32750 32751 32752 32753 32754 32755 32756 32757 32758 32759 32760 32761 32762 32763 32764 32765 32766 32767 32768 32769 32770 32771 32772 32773 32774 32775 32776 32777 32778 32779 32780 32781 32782 32783 32784 32785 32786 32787 32788 32789 32790 32791 32792 32793 32794 32795 32796 32797 32798 32799 32800 32801 32802 32803 32804 32805 32806 32807 32808 32809 32810 32811 32812 32813 32814 32815 32816 32817 32818 32819 32820 32821 32822 32823 32824 32825 32826 32827 32828 32829 32830
After Value Ordering:
size:
2 2 3 4 5 5 6 7 9 10 12 4 6 8 9 11 12 16 16 16 16 5 8 10 12 15 16 16 16 16 16 5 8 10 12 16 16 16 16 16 16 6 9 16 16 16 16 16 16 16 16 6 10 16 16 16 16 16 16 16 16 7 11 16 16 16 16 16 16 16 16 7 11 16 16 16 16 16 16 16 16 8 16 16 16 16 16 16 16 16 16 9 16 16 16 16 16 16 16 16 16 9 16 16 16 16 16 16 16 16 16 9 16 16 16 16 16 16 16 16 16 9 16 16 16 16 16 16 16 16 16 11 16 16 16 16 16 16 16 16 16 14 16 16 16 16 16 16 16 16 16 10 15 16 16 16 16 16 16 16 16 16
value: 0/0 0/1 0/2 0/3 0/4 0/5 0/6 0/7 0/8 0/9 0/a 1/1 1/2 1/3 1/4 1/5 1/6 1/7 1/8 1/9 1/a 2/1 2/2 2/3 2/4 2/5 2/6 2/7 2/8 2/9 2/a 3/1 3/2 3/3 3/4 3/5 3/6 3/7 3/8 3/9 3/a 4/1 4/2 4/3 4/4 4/5 4/6 4/7 4/8 4/9 4/a 5/1 5/2 5/3 5/4 5/5 5/6 5/7 5/8 5/9 5/a 6/1 6/2 6/3 6/4 6/5 6/6 6/7 6/8 6/9 6/a 7/1 7/2 7/3 7/4 7/5 7/6 7/7 7/8 7/9 7/a 8/1 8/2 8/3 8/4 8/5 8/6 8/7 8/8 8/9 8/a 9/1 9/2 9/3 9/4 9/5 9/6 9/7 9/8 9/9 9/a a/1 a/2 a/3 a/4 a/5 a/6 a/7 a/8 a/9 a/a b/1 b/2 b/3 b/4 b/5 b/6 b/7 b/8 b/9 b/a c/1 c/2 c/3 c/4 c/5 c/6 c/7 c/8 c/9 c/a d/1 d/2 d/3 d/4 d/5 d/6 d/7 d/8 d/9 d/a e/1 e/2 e/3 e/4 e/5 e/6 e/7 e/8 e/9 e/a f/0 f/1 f/2 f/3 f/4 f/5 f/6 f/7 f/8 f/9 f/a
code:
0 1 4 10 24 25 56 120 500 1014 4084 11 57 246 501 2038 4085 32712 32713 32714 32715 26 247 1015 4086 16354 32716 32717 32718 32719 32720 27 248 1016 4087 32721 32722 32723 32724 32725 32726 58 502 32727 32728 32729 32730 32731 32732 32733 32734 59 1017 32735 32736 32737 32738 32739 32740 32741 32742 121 2039 32743 32744 32745 32746 32747 32748 32749 32750 122 2040 32751 32752 32753 32754 32755 32756 32757 32758 249 32759 32760 32761 32762 32763 32764 32765 32766 32767 503 32768 32769 32770 32771 32772 32773 32774 32775 32776 504 32777 32778 32779 32780 32781 32782 32783 32784 32785 505 32786 32787 32788 32789 32790 32791 32792 32793 32794 506 32795 32796 32797 32798 32799 32800 32801 32802 32803 2041 32804 32805 32806 32807 32808 32809 32810 32811 32812 8176 32813 32814 32815 32816 32817 32818 32819 32820 32821 1018 16355 32822 32823 32824 32825 32826 32827 32828 32829 32830
marker: ffda
length: 0c
這次的作業,是用手動/程式讀取JPEG的Header,在上JPEG檔案的格式的時候,精神狀況實在不是很好,頻頻打瞌睡,只知道要交一份作業是有關於JPEG的Header讀取的作業,用程式或是PSPad都可以,所以我就上網去找了一些有關於JPEG檔案格式的相關資訊,在其中我印象最深刻的是Zig-Zag scan,對其印象深刻的原因是因為之前有上過數位電視的課程,裡面有講到MPEG-2的壓縮方式,所以對其印象最深刻。
之後從老師的Blogger中去找到老師研究的成果,從老師的文章中找到一張記錄JPEG header裡面相對應的16進位編碼,再使用PS PAD解讀,完成此次作業。
沒有留言:
張貼留言