I\'m trying to understand these two methods of the Bitmap or Image. One being .SetPropertyItem()
and the other being .GetPropertyItem()
.
I\
This is somewhat late, but it IS possible to create a new PropertyItem instance, without going through the pain of having to establish one from another source:
using System.Runtime.Serialization;
...
var newItem = (PropertyItem)FormatterServices.GetUninitializedObject(typeof(PropertyItem));
This gets around the lack of constructor specified on PropertyItem (which seemed to prevent me from using System.Reflection)