改变图像属性 [英] changing image properties

查看:107
本文介绍了改变图像属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Windows窗体中更改图像的大小和分辨率???

how to change size and resolution of a image in windows form???

推荐答案

重新绘制它: http://msdn.microsoft.com/en-us/library/4f9s3at1(v = vs.110)的.aspx [ ^ ]

有几个重载允许您重新缩放图像,而对于分辨率,您只需要在创建要绘制的目标位图时使用 Bitmap.SetResolution [ ^ 方法。

然后使用 GRA phics.FromImage [ ^ ]并使用它代替第一个链接的示例中的Graphics对象并设置!
Re-draw it: http://msdn.microsoft.com/en-us/library/4f9s3at1(v=vs.110).aspx[^]
There are several overloads that allow you to re-scale the image, and for resolution you just need to set that when you create the target bitmap to draw on, or using the Bitmap.SetResolution[^] method.
Then just get the Graphics context using Graphics.FromImage[^] and use that instead of the Graphics object in the example with the first link and you're set!


这篇关于改变图像属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆