Phil
I'm adding ICC profile support to Exiv2 for the upcoming v0.26 release. I think there's an error in the ICC document: ICC1v43_2010-12.pdf <— Annex B contains embedding spec
It says that the profile should be embedded in an APP2 Segment with the initial bytes of the data set to ICC_PROFILE\0 (12 bytes) followed by a chunk counter (one byte) and total chunks (one byte). So, the first 14 bytes are defined. I assume the remainder of the segment is profile data. However, from testing using iccDumpProfile, there seem to be 4 padding bytes (2 before the data and 2 after).
I've written a little script to download all your test bundles (such as Canon.tar.gz). You have 6577 JPGs of which 92 have embedded ICC profiles. To successfully run iccDumpProfile on these profiles, I have to strip the 4 padding bytes.
What do you think?