JPEG APP13 (used to store IPTC IRB) can not be larger than 64kB but IRB buffers can
Exiv2 should allow to set IPTC data which is larger than 64k (the limit for the Preview field is 256000 bytes according to the specs) and it should allow to copy that IPTC data data buffer in a binary format. However, it should NOT allow to write an IPTC block larger than 64k to a JPEG image (using Image::writeMetadata).
Currently there is no check of the size of the APP13 segment which results in corrupted JPEGs if an IRB block larger than 64k is written.
On the other hand, the IRB block by itself is currently unnecessarily limited to 64k.
This problem was first reported as digikam bug 130525: http://bugs.kde.org/show_bug.cgi?id=130525