Пример #1
0
        public static void PasteTile(FreeImageAlgorithmsBitmap dst,
                                     FreeImageAlgorithmsBitmap src, Point location, bool blending)
        {
            if (blending)
            {
                if (!dst.GradientBlendPasteFromTopLeft(src, location))
                {
                    string errorStr = String.Format(
                        "Can not paste freeimage. Dst image bpp {0}, Src image bpp {1}",
                        dst.ColorDepth, src.ColorDepth);

                    throw new FormatException(errorStr);
                }
            }
            else
            {
                if (!dst.PasteFromTopLeft(src, location))
                {
                    string errorStr = String.Format(
                        "Can not paste freeimage. Dst image bpp {0}, Src image bpp {1}",
                        dst.ColorDepth, src.ColorDepth);

                    throw new FormatException(errorStr);
                }
            }
        }