Esempio n. 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            MemBitmap srcBmp = LoadImage("Samples\\lion1.png");

            PaintFx.Surface src = CreateSurfaceFromMemBitmap(srcBmp);

            MemBitmap dstBmp = new MemBitmap(srcBmp.Width / 2, srcBmp.Height / 2);

            PaintFx.Surface dst = CreateSurfaceFromMemBitmap(dstBmp);


            dst.SuperSamplingBlit(src, new PixelFarm.Drawing.Rectangle(0, 0, src.Width / 5, src.Height / 5));

            SaveImage(dstBmp, "d:\\WImageTest\\test01_txPaintFx.png");
        }
Esempio n. 2
0
        private void button3_Click(object sender, EventArgs e)
        {
            MemBitmap srcBmp = LoadImage("Samples\\lion1.png");

            PaintFx.Surface src = CreateSurfaceFromMemBitmap(srcBmp);

            MemBitmap dstBmp = new MemBitmap(srcBmp.Width / 2, srcBmp.Height / 2);

            PaintFx.Surface dst = CreateSurfaceFromMemBitmap(dstBmp);


            dst.SuperSamplingBlit(src, new PixelFarm.Drawing.Rectangle(0, 0, src.Width / 5, src.Height / 5));

            SaveImage(dstBmp, "test01_txPaintFx.png");

            pictureBox1.Image = null;
            if (_resultBmp != null)
            {
                _resultBmp.Dispose();
                _resultBmp = null;
            }

            pictureBox1.Image = _resultBmp = new Bitmap("test01_txPaintFx.png");
        }