Esempio n. 1
0
 /// <summary>
 /// unsigned long の値を設定する。
 /// </summary>
 /// <param name="id"></param>
 /// <param name="value"></param>
 /// <returns></returns>
 public ImagePropertyItemWriter SetPropertyItem(PropertyTags id, uint value)
 {
     byte[] bytes = new byte[sizeof(ulong)];
     for (int i = 0; i < sizeof(ulong); i++)
     {
         bytes[i] = (byte)((value >> (i * 8)) & 0xff);
     }
     SetPropertyItem(id, PropertyTagType.PropertyTagTypeLong, bytes.Length, bytes);
     return(this);
 }
Esempio n. 2
0
        /// <summary>
        /// 指定したIDのPropertyItemを得る。
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public PropertyItem GetPropertyItemById(PropertyTags id)
        {
            PropertyItem propertyItem = null;

            if (propertyDictionaryById.TryGetValue((int)id, out propertyItem))
            {
                return(propertyItem);
            }
            return(null);
        }
Esempio n. 3
0
 /// <summary>
 /// プロパティを設定する。
 /// </summary>
 /// <param name="id"></param>
 /// <param name="type"></param>
 /// <param name="len"></param>
 /// <param name="value"></param>
 /// <returns></returns>
 private ImagePropertyItemWriter SetPropertyItem(
     PropertyTags id, PropertyTagType type, int len, byte[] value)
 {
     propSeed.Id    = (int)id;
     propSeed.Type  = (short)type;
     propSeed.Len   = len;
     propSeed.Value = value;
     LogPropertyItem("[PropertyItemAdder.SetPropertyItem] ", propSeed);
     image.SetPropertyItem(propSeed);
     return(this);
 }
Esempio n. 4
0
 /// <summary>
 /// byte値のプロパティを設定する。
 /// </summary>
 /// <param name="id"></param>
 /// <param name="value"></param>
 /// <returns></returns>
 public ImagePropertyItemWriter SetPropertyItem(PropertyTags id, byte value)
 {
     byte[] bytes = new byte[] { value };
     SetPropertyItem(id, PropertyTagType.PropertyTagTypeByte, bytes.Length, bytes);
     return(this);
 }
Esempio n. 5
0
 /// <summary>
 /// 文字列のプロパティを設定する。
 /// </summary>
 /// <param name="id"></param>
 /// <param name="value"></param>
 /// <returns></returns>
 public ImagePropertyItemWriter SetPropertyItem(PropertyTags id, string value)
 {
     byte[] bytes = ImagePropertyItemWriter.StringToByteArray(value);
     SetPropertyItem(id, PropertyTagType.PropertyTagTypeASCII, bytes.Length, bytes);
     return(this);
 }