creating a new iptc profile and adding some content leads often to not readable iptc section. I found out, that the length of fields ist not correct in that cases. See attachement field caption.
Code to reproduce:
```
foreach (var profileName in image.ProfileNames)
image.RemoveProfile(profileName);
image.Format = MagickFormat.Jpeg;
var iptcProfile = new IptcProfile();
iptcProfile.SetValue(IptcTag.Headline, titel.EntferneSonderzeichen());
iptcProfile.SetValue(IptcTag.SpecialInstructions, folgentitel.EntferneSonderzeichen());
iptcProfile.SetValue(IptcTag.CreatedDate, sendetag.ToString("yyyMMdd"));
iptcProfile.SetValue(IptcTag.Country, (sendetag + beginn).ToShortTimeString());
iptcProfile.SetValue(IptcTag.City, "KiKA");
var encoding = bild.Copyright.EntferneSonderzeichen();
iptcProfile.SetValue(IptcTag.Credit, encoding?? "Keine Copyright Informationen.");
iptcProfile.SetValue(IptcTag.Source, bild.Autor.EntferneSonderzeichen() ?? "");
iptcProfile.SetValue(IptcTag.Title, string.Join(" ", new[]
{
titel.EntferneSonderzeichen(),
sendetag.ToShortDateString()
}));
iptcProfile.SetValue(IptcTag.Caption, string.Join(" ", new[]
{
bild.Untertitel.EntferneSonderzeichen() ?? "",
bild.Abdruckhinweis.EntferneSonderzeichen() ?? ""
}));
iptcProfile.SetValue(IptcTag.Keyword,
string.Join(", ", bild.Schlagworte ?? Enumerable.Empty<SchlagwortBox>()));
iptcProfile.SetValue(IptcTag.CopyrightNotice, bild.Abdruckhinweis.EntferneSonderzeichen() ?? "");
image.AddProfile(iptcProfile);
image.SaveTo(_fileSystem, zielPfad);
```
Comments: Resolved with changeset 37794: Fixed writing invalid length in IPTC profile.
Code to reproduce:
```
foreach (var profileName in image.ProfileNames)
image.RemoveProfile(profileName);
image.Format = MagickFormat.Jpeg;
var iptcProfile = new IptcProfile();
iptcProfile.SetValue(IptcTag.Headline, titel.EntferneSonderzeichen());
iptcProfile.SetValue(IptcTag.SpecialInstructions, folgentitel.EntferneSonderzeichen());
iptcProfile.SetValue(IptcTag.CreatedDate, sendetag.ToString("yyyMMdd"));
iptcProfile.SetValue(IptcTag.Country, (sendetag + beginn).ToShortTimeString());
iptcProfile.SetValue(IptcTag.City, "KiKA");
var encoding = bild.Copyright.EntferneSonderzeichen();
iptcProfile.SetValue(IptcTag.Credit, encoding?? "Keine Copyright Informationen.");
iptcProfile.SetValue(IptcTag.Source, bild.Autor.EntferneSonderzeichen() ?? "");
iptcProfile.SetValue(IptcTag.Title, string.Join(" ", new[]
{
titel.EntferneSonderzeichen(),
sendetag.ToShortDateString()
}));
iptcProfile.SetValue(IptcTag.Caption, string.Join(" ", new[]
{
bild.Untertitel.EntferneSonderzeichen() ?? "",
bild.Abdruckhinweis.EntferneSonderzeichen() ?? ""
}));
iptcProfile.SetValue(IptcTag.Keyword,
string.Join(", ", bild.Schlagworte ?? Enumerable.Empty<SchlagwortBox>()));
iptcProfile.SetValue(IptcTag.CopyrightNotice, bild.Abdruckhinweis.EntferneSonderzeichen() ?? "");
image.AddProfile(iptcProfile);
image.SaveTo(_fileSystem, zielPfad);
```
Comments: Resolved with changeset 37794: Fixed writing invalid length in IPTC profile.