Hi, I want to customize the "specification" (=binary) of a jpeg file. Actually, I want that the four huffman tables to be declared in one section : we have the mark "ffc4" an then the size of the section and some informations and finally the code of huffman tables. here the file: 0000000: ffd8 ffe0 0010 4a46 4946 0001 0101 0060 ......JFIF.....` 0000010: 0060 0000 ffdb 0043 0003 0202 0302 0203 .`.....C........ 0000020: 0303 0304 0303 0405 0805 0504 0405 0a07 ................ 0000030: 0706 080c 0a0c 0c0b 0a0b 0b0d 0e12 100d ................ 0000040: 0e11 0e0b 0b10 1610 1113 1415 1515 0c0f ................ 0000050: 1718 1614 1812 1415 14ff db00 4301 0304 ............C... 0000060: 0405 0405 0905 0509 140d 0b0d 1414 1414 ................ 0000070: 1414 1414 1414 1414 1414 1414 1414 1414 ................ 0000080: 1414 1414 1414 1414 1414 1414 1414 1414 ................ 0000090: 1414 1414 1414 1414 1414 1414 1414 ffc0 ................ 00000a0: 0011 0803 0004 0003 0122 0002 1101 0311 ........."...... 00000b0: 01[COLOR="red"]ff c4[/COLOR]00 1f00 0001 0501 0101 0101 0100 ................ 00000c0: 0000 0000 0000 0001 0203 0405 0607 0809 ................ 00000d0: 0a0b [COLOR="red"]ffc4[/COLOR] 00b5 1000 0201 0303 0204 0305 ................ 00000e0: 0504 0400 0001 7d01 0203 0004 1105 1221 ......}........! 00000f0: 3141 0613 5161 0722 7114 3281 91a1 0823 1A..Qa."q.2....# 0000100: 42b1 c115 52d1 f024 3362 7282 090a 1617 B...R..$3br..... 0000110: 1819 1a25 2627 2829 2a34 3536 3738 393a ...%&'()*456789: 0000120: 4344 4546 4748 494a 5354 5556 5758 595a CDEFGHIJSTUVWXYZ 0000130: 6364 6566 6768 696a 7374 7576 7778 797a cdefghijstuvwxyz 0000140: 8384 8586 8788 898a 9293 9495 9697 9899 ................ 0000150: 9aa2 a3a4 a5a6 a7a8 a9aa b2b3 b4b5 b6b7 ................ 0000160: b8b9 bac2 c3c4 c5c6 c7c8 c9ca d2d3 d4d5 ................ 0000170: d6d7 d8d9 dae1 e2e3 e4e5 e6e7 e8e9 eaf1 ................ 0000180: f2f3 f4f5 f6f7 f8f9 fa[COLOR="red"]ff c4[/COLOR]00 1f01 0003 ................ 0000190: 0101 0101 0101 0101 0100 0000 0000 0001 ................ 00001a0: 0203 0405 0607 0809 0a0b [COLOR="red"]ffc4[/COLOR] 00b5 1100 ................ 00001b0: 0201 0204 0403 0407 0504 0400 0102 7700 ..............w. 00001c0: 0102 0311 0405 2131 0612 4151 0761 7113 ......!1..AQ.aq. 00001d0: 2232 8108 1442 91a1 b1c1 0923 3352 f015 "2...B.....#3R.. 00001e0: 6272 d10a 1624 34e1 25f1 1718 191a 2627 br...$4.%.....&' 00001f0: 2829 2a35 3637 3839 3a43 4445 4647 4849 ()*56789:CDEFGHI 0000200: 4a53 5455 5657 5859 5a63 6465 6667 6869 JSTUVWXYZcdefghi 0000210: 6a73 7475 7677 7879 7a82 8384 8586 8788 jstuvwxyz....... 0000220: 898a 9293 9495 9697 9899 9aa2 a3a4 a5a6 ................ 0000230: a7a8 a9aa b2b3 b4b5 b6b7 b8b9 bac2 c3c4 ................ 0000240: c5c6 c7c8 c9ca d2d3 d4d5 d6d7 d8d9 dae2 ................ 0000250: e3e4 e5e6 e7e8 e9ea f2f3 f4f5 f6f7 f8f9 ................ 0000260: fa [...] Code (markup): I open the jpeg file with vim and I run : :%!xxd in order to see the hexa code of the image. Then I know that i can modify the binary data and save by the command : %!xxd -r. But the point is i don't know how i can modify my file in order to declare the huffman table in one section. Do you have an idea ?