I'm interested in manually injecting IPTC fields into JPG file on bytes level. JPEG file has multiple metadata segments with respectable size markers. The segments-containers for IPTC are:
App13 - starts with FF ED XX XX ..
8BIM IPTC text metadata - starts with 38 42 49 4D 04 04 00 00 00 00 XX XX ..
IPTC field starts with 1C 02 50 XX XX ..
(0x50 = 80, IPTC field #80).
(XX XX = 2 bytes of length-word describing size of mentioned segment data).
Are there any other size markers in JPEG file & metadata to look out for? Do I have to increase their size when appending metadata segment with custom IPTC fields?
How can I add custom metadata field (for example #225) that will work on all JPEG images that already contain IPTC segment?
Working in C# but it's a question about operations on bytes so I guess language doesn't matter.