示例#1
0
 internal ImageResource(string name, ImageResourceType type, byte[] data)
 {
     Name  = name;
     Type  = type;
     _data = data;
     Size  = data.Length;
 }
示例#2
0
 internal ImageResource(IntPtr name, ImageResourceType type, SafeLoadLibraryHandle library)
 {
     Name = ImageUtils.GetResourceString(name);
     Type = type;
     if (library != null)
     {
         _data = library.LoadResourceData(Name, type, false).GetResultOrDefault();
         Size  = _data.Length;
     }
     else
     {
         _data = null;
         Size  = 0;
     }
 }