/// <summary>
        /// Read icon data.
        /// </summary>
        /// <param name="lpData">Pointer to the beginning of icon data.</param>
        /// <param name="size">Icon data size.</param>
        internal void Read(IntPtr lpData, uint size)
        {
            _header = (Gdi32.BITMAPINFOHEADER)Marshal.PtrToStructure(
                lpData, typeof(Gdi32.BITMAPINFOHEADER));

            _data = new byte[size];
            Marshal.Copy(lpData, _data, 0, _data.Length);
        }
 /// <summary>
 /// Create a copy of an image.
 /// </summary>
 /// <param name="image">Source image.</param>
 public DeviceIndependentBitmap(DeviceIndependentBitmap image)
 {
     _data = new byte[image._data.Length];
     Buffer.BlockCopy(image._data, 0, _data, 0, image._data.Length);
     _header = image._header;
 }
        /// <summary>
        /// Read icon data.
        /// </summary>
        /// <param name="lpData">Pointer to the beginning of icon data.</param>
        /// <param name="size">Icon data size.</param>
        internal void Read(IntPtr lpData, uint size)
        {
            _header = (Gdi32.BITMAPINFOHEADER)Marshal.PtrToStructure(
                lpData, typeof(Gdi32.BITMAPINFOHEADER));

            _data = new byte[size];
            Marshal.Copy(lpData, _data, 0, _data.Length);
        }
 /// <summary>
 /// Create a copy of an image.
 /// </summary>
 /// <param name="image">Source image.</param>
 public DeviceIndependentBitmap(DeviceIndependentBitmap image)
 {
     _data = new byte[image._data.Length];
     Buffer.BlockCopy(image._data, 0, _data, 0, image._data.Length);
     _header = image._header;
 }