我用Graphics的DrawImage方法画出来的图比原来的图片模糊,这是正常的吗?
今天刚开始学习Graphics的DrawImage方法,用了两个PictrueBox,box1是存储原图的,我把原图平移一下,画到box2里面,代码如下
Bitmap box1 = new Bitmap(pictureBox1.Image);
Bitmap box2 = new Bitmap(pictureBox1.Image.Width, pictureBox1.Image.Height);
Graphics g = pictureBox2.CreateGraphics();
g.Clear(this.pictureBox2.BackColor);
float x = (float)Double.Parse(textBox2.Text);
g.TranslateTransform(x, x);
g.DrawImage(box1, this.pictureBox2.ClientRectangle, 0, 0, box2.Width, box2.Height, GraphicsUnit.Pixel);
很简单的代码,立刻就画出来了。但是我发现新画出来的图比原来的要模糊,囧死我了……请问大家遇到过这种情况吗?是否正常?