internal ImageResource(string name, ImageResourceType type, byte[] data) { Name = name; Type = type; _data = data; Size = data.Length; }
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; } }