Beispiel #1
0
        public FreeImageAlgorithmsBitmap(int width, int height, int colorDepth)
        {
            FIBITMAP dib = FreeImage.Allocate(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);

            this.SetGreyLevelPalette();
        }