Hope to seek some help. I am trying to add some text to Exif field ImageDescription(270). I am partially successful. Here is the code
pitem.Id = 270;
pitem.Type = 2;
byte[] utf16Bytes = Encoding.Unicode.GetBytes("Testing ImageDescription from command line.");
byte[] utf8Bytes = Encoding.Convert(Encoding.Unicode, Encoding.UTF8, utf16Bytes);
pitem.Value = utf8Bytes;//utf16Bytes
image.SetPropertyItem(pitem);
I then save image copy at new path, then I try to read back the property just added. THIS is where I am so failing..:-( For some reason this field is not taking more then 6 characters, I have tried many things including change data to UTF-8 byte array, adding null-terminator (\0), even tried another field (305) with the same issue there as well, field will not take more then 6 characters.. I am not being able to see the full text being added to the field. Can some one guide..
Thanks