当前位置:编程学习 > C#/ASP.NET >>

Graphics.DrawImage 的问题



用的是 Graphics.DrawImage(newImage, destRect, srcRect, units)

代码是:
Dim newImage As Image = PictureBox1.Image
Dim destRect As New Rectangle(0, 0, 1120, 1120)
Dim srcRect As New Rectangle(1520,240,2640,1360)
Dim units As GraphicsUnit = GraphicsUnit.Pixel    

gr.DrawImage(newImage, destRect, srcRect, units)
PictureBox2.Image = resultBitmap

为什么截到的图变形了呢?看起来是横向上多了一部分 --------------------编程问答-------------------- PictureBox2的size是1120*1120?
如果不是就是picturebox2把这个图像拉伸了
补充:.NET技术 ,  VB.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,