it is suggested that you usegraphics.InterpolationMode =
System.Drawing.Drawing2D.InterpolationMode.High;
graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;see (never tested, so don't know if it works):
http://groups.google.com/groups?q=GetThumbnailImage+high+resolution&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=OC6Oj2F%24CHA.2208%40TK2MSFTNGP12.phx.gbl&rnum=3
System.Drawing.Drawing2D.InterpolationMode.High;
graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;see (never tested, so don't know if it works):
http://groups.google.com/groups?q=GetThumbnailImage+high+resolution&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=OC6Oj2F%24CHA.2208%40TK2MSFTNGP12.phx.gbl&rnum=3
解决方案 »
- 求 C#高级编程 第6版 pdf 下载地址
- 请教datagridview怎么改变字体大小(C#)?
- 求教C#跟托管C++混合编程的问题
- C#中用DataGridView来删除数据,要求删除的数据变成无效,还能读出来,怎么实现,谢谢。
- object类型变量的输出问题
- 急啊``像这样的函数aa(int** b),在C#里怎样调用啊?
- 谁有《Internet Email编程》《.net网络高级编程》这两本电子书??100分+100分
- 请钩子高手帮助,我写的钩子函数为什么有问题??
- xml文件操作的问题,有点麻烦啊!!!
- 怎样实现在服务器端不安装Office也可以用C#打开读取Excel文件?
- 我将访问有ACCESS的程序拷到另一台电脑上,提示访问数据库版本有问题,都有NET,怎么回事?
- Access数据库与C#问题:
string originalFilename = "c:\\222.jpg";
//生成的高质量图片名称
string strGoodFile = "c:\\222-small-good.jpg";
//生成的低质量图片名称
string strBadFile = "c:\\222-small-bad.jpg";
//缩小的倍数
int iScale = 3;
//从文件取得图片对象
System.Drawing.Image image = System.Drawing.Image.FromFile(originalFilename);
//取得图片大小
System.Drawing.Size size = new Size(image.Width / iScale , image.Height / iScale);
//新建一个bmp图片
System.Drawing.Image bitmap = new System.Drawing.Bitmap(size.Width,size.Height);
//新建一个画板
System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(bitmap);
//设置高质量插值法
g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High;
//设置高质量,低速度呈现平滑程度
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
//清空一下画布
g.Clear(Color.Blue);
//在指定位置画图
g.DrawImage(image, new System.Drawing.Rectangle(0, 0, bitmap.Width, bitmap.Height),
new System.Drawing.Rectangle(0, 0, image.Width,image.Height),
System.Drawing.GraphicsUnit.Pixel);
//保存高清晰度的缩略图
bitmap.Save(strGoodFile, System.Drawing.Imaging.ImageFormat.Jpeg);
//取得原图像的普通缩略图
System.Drawing.Image img = image.GetThumbnailImage(image.Width / iScale, image.Height / iScale, null, IntPtr.Zero);
//保存普通缩略图
img.Save(strBadFile, System.Drawing.Imaging.ImageFormat.Jpeg);
g.Dispose();
MessageBox.Show("生成完毕");
g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High;
这个还有几个Mode,有三次插值什么的,但我试了,效果都一样