示例#1
0
        private void interpolateBtn_Click(object sender, EventArgs e)
        {
            try
            {
                BicubicInterpolator interpolate = new BicubicInterpolator();
                Bitmap org = new Bitmap(orgPicBox.Image);


                modifiedPicBox.Image = interpolate.BitmapTo2DArrays(org);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
示例#2
0
        private void interpolateBtn_Click(object sender, EventArgs e)
        {
            BicubicInterpolator interpolate = new BicubicInterpolator();
            Bitmap org = new Bitmap(orgPicBox.Image);

            //modifiedPicBox.Image = MakelargerImager(org, org.Size.Width * 2, org.Size.Height * 2);
            modifiedPicBox.Image = interpolate.BitmapTo2DArrays(org);
            //Bitmap result = new Bitmap(org.Width * 2, org.Height * 2);
            //using (Graphics g = Graphics.FromImage(result))
            //{
            //    g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
            //    g.DrawImage(org, 0, 0, org.Width * 2, org.Height * 2);

            //}

            //modifiedPicBox.Image = result;
        }