/// <summary> /// The SetDIBColorTable function sets RGB (red, green, blue) color values in a range of entries in the color table of the DIB /// that is currently selected into a specified device context. /// </summary> /// <param name="hdc">Specifies a device context. A DIB must be selected into this device context</param> /// <param name="iStart">A zero-based color table index that specifies the first color table entry to set</param> /// <param name="cEntries">Specifies the number of color table entries to set</param> /// <param name="prgbq">An array of RGBQUAD structures containing new color information for the DIB's color table</param> /// <returns>If the function succeeds, the return value is the number of color table entries that the function sets, else 0</returns> /// <remarks>This function should be called to set the color table for DIBs that use 1, 4, or 8 bpp. The BitCount member of a /// bitmap's associated bitmap information header structure</remarks> public static uint SetDIBColorTable(IntPtr hdc, uint iStart, uint cEntries, RGBQuad[] prgbq) { return Native.SetDIBColorTable(hdc, iStart, cEntries, prgbq); }
public BitmapInfo(ref byte[] contents, long offset) { BitmapHeader = new BitmapInfoHeader(ref contents, offset); Rgb = new RGBQuad(ref contents, offset); }