private static extern int GdipBitmapConvertFormat(IntPtr bitmap, int pixelFormat, DitherType dithertype, PaletteType palettetype, ref GdiPalette Pal, float alphaThresholdPercent);
private static extern int GdipInitializePalette(ref GdiPalette Pal, int palettetype, int optimalColors, int useTransparentColor, IntPtr bitmap);