コード例 #1
0
 private static void SetPropertyItemString(Image srcImg, ImageMetadataPropertyId id, string value)
 {
     var buffer = Encoding.Unicode.GetBytes(value);
     var propItem = srcImg.GetPropertyItem(srcImg.PropertyItems[0].Id);
     propItem.Id = (int)id;
     propItem.Type = 1;
     propItem.Len = buffer.Length;
     propItem.Value = buffer;
     srcImg.SetPropertyItem(propItem);
 }
コード例 #2
0
        private static void SetPropertyItemString(Image srcImg, ImageMetadataPropertyId id, string value)
        {
            var buffer   = Encoding.Unicode.GetBytes(value);
            var propItem = srcImg.GetPropertyItem(srcImg.PropertyItems[0].Id);

            propItem.Id    = (int)id;
            propItem.Type  = 1;
            propItem.Len   = buffer.Length;
            propItem.Value = buffer;
            srcImg.SetPropertyItem(propItem);
        }