Within the property window of a JPEG image, there is a tab called \'Summary\'. Within this tab, there is a field called \'Comments\' I would like to write some c# code which
The easy part:
Add this property item:
var data = System.Text.Encoding.UTF8.GetBytes( "Some comments" );
PropertyItem pi;
*** create an empty PropertyItem here
pi.Type = 2;
pi.Id = 37510;
pi.Len = data.Length;
pi.Value = data;
To the Image's PropertItems collection.
The somewhat more cumbersome part: How do you create a new PropertyItem, since it has no public constructor?
The common "trick" is to have an empty image lying around from which you can steal a PropertyItem. sigh