public FreeImageAlgorithmsBitmap(int width, int height, FREE_IMAGE_TYPE type, int colorDepth) { FIBITMAP dib = FreeImage.AllocateT(type, width, height, colorDepth, FreeImage.FI_RGBA_RED_MASK, FreeImage.FI_RGBA_GREEN_MASK, FreeImage.FI_RGBA_BLUE_MASK); if (dib.IsNull) { throw new Exception("Unable to create bitmap."); } this.ReplaceDib(dib); }