目前我有很多像素很大的JPG图像文件,我想做一个程序把他们全部缩小。比如以前是1024*768的图片文件
我想用C#写一个程序,通过这个程序把图片转换成800*600的请问牛人能够实现吗?你们有这样的控件吗?
小弟先谢过了
我想用C#写一个程序,通过这个程序把图片转换成800*600的请问牛人能够实现吗?你们有这样的控件吗?
小弟先谢过了
解决方案 »
- 关于CommandBuilder的问题..我无奈了,望大哥大姐们进来看下啊!!
- 急,请教一下水晶报表怎样绑定List<>数据源?谢谢
- 自动调用程序的函数
- .net走 httphandler 调用c++写的dll不成功?
- 小问题
- 熟悉 DataGrid 的请指点——关于定制 DataGrid 的问题,急用!!!
- 有偿实现bbs注册和发帖
- 热心的朋友给升级成了VIP群,大家都来吧,.net程序员群,还能招75个人,闲着也是闲着
- 安装VS.NET,安装windows更新组件过程中,NET框架始终无法安装,操作系统是win 2k profession
- 当两个或更多线程需要同时访问一个共享资源时,这里的[共享资源]是指哪些呢?
- 为何XmlNode的节点值为空?
- bit字段对应c#中的数据类型
//' String urlpath="vl_pic_decorate\\"; //'财产图片路径(商店等)
//' String goodpath="vl_pic_goods\\"; //'商品图片路径
//'imgurl="C:\\Inetpub\\wwwroot\\virtual_life\\vl_pic_decorate\\1\\";
int i=0;
int n=0;
String imgurl="";
int h=0;
int w=0;
for(n=1;n<=5;n++)
{
i=n;
imgurl="vl_pic_decorate\\1\\";
imgurl=imgurl+i.ToString()+".jgp";
System.Drawing.Image oldimg = System.Drawing.Image.FromFile(Server.MapPath(imgurl));
System.Drawing.Image newimg = oldimg.GetThumbnailImage( 60, 60 * oldimg.Height/oldimg.Width,null,new System.IntPtr(0));
String new_imgpath="vl_pic_decorate\\01\\"+i.ToString()+".jpg";
newimg.Save(Server.MapPath(new_imgpath),System.Drawing.Imaging.ImageFormat.Jpeg);
}/*
System.Drawing.Image oldimg = System.Drawing.Image.FromFile( Server.MapPath(imgurl));
System.Drawing.Image newimg = oldimg.GetThumbnailImage( 60, 60 * oldimg.Height/oldimg.Width,null,new System.IntPtr(0));
string new_imgpath = imgurl.Substring(imgurl.IndexOf("/")+1,imgurl.IndexOf(".")-imgurl.IndexOf("/")-1);
newimg.Save( Server.MapPath( "images/" ) + new_imgpath+"th.jpg",System.Drawin
*//*
System.Drawing.Bitmap Img_tmp = new System.Drawing.Bitmap(imgurl);
h=100;
w=100*(Img_tmp.Width/Img_tmp.Height);
Graphics graphics = Graphics.FromImage(Img_tmp);
graphics.DrawImage(Img_tmp,0,0,h,w);
String new_imgpath="vl_pic_decorate\\01\\"+i.ToString()+".jpg";
Img_tmp.Save(Server.MapPath(new_imgpath),System.Drawing.Imaging.ImageFormat.Jpeg); //'imgurl="C:\\head.bmp"; //'imgurl+"1.jpg";
System.Drawing.Image oldimg = System.Drawing.Image.FromFile(Img_tmp);//'Server.MapPath(imgurl));
System.Drawing.Image newimg = oldimg.GetThumbnailImage( 100, 100 * oldimg.Height/oldimg.Width,null,new System.IntPtr(0));
String new_imgpath="vl_pic_decorate\\01\\";
//'string new_imgpath = imgurl.Substring(imgurl.IndexOf("/")+1,imgurl.IndexOf(".")-imgurl.IndexOf("/")-1);
newimg.Save(Server.MapPath(new_imgpath) + i.ToString()+".jpg",System.Drawing.Imaging.ImageFormat.Jpeg);
*/%>