C#怎么截取图片的一部分 使用C#从网页中保存一张图片,保存的同时只截取图片的上半部分保存 ,怎么写C# 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Bitmap newbitmap=new Bitmap(source.Width/2,source.Height/2);Graphics g=Graphics.FromImage(newbitmap);g.DrawImage(source,0,0);g.Dispose();newbitmap.Save("");newbitmap.Dispose(); Bitmap newbitmap=new Bitmap(source.Width,source.Height/2);搞错了 Bitmap bmp = new Bitmap(@"E:\4.1\209\mobile.jpg"); Graphics g = Graphics.FromImage(bmp); Rectangle aaa = new Rectangle(0, 0, 2, 2); g.DrawImage(bmp, 0, 0, aaa, GraphicsUnit.Pixel); bmp.Save(@"E:\4.1\209\mobile1.jpg", System.Drawing.Imaging.ImageFormat.Bmp);目前写成这样 没用 求该 Bitmap source = new Bitmap(@"E:\4.1\209\mobile.jpg");Bitmap newbitmap=new Bitmap(source.Width,source.Height/2);Graphics g=Graphics.FromImage(newbitmap);g.DrawImage(source,0,0);g.Dispose();newbitmap.Save(@"E:\4.1\209\mobile1.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);newbitmap.Dispose(); source.Dispose(); Bitmap newbitmap = new Bitmap(source.Width, source.Height);按照原比例出的图和原图范围不一致呢 指定大小就可以了g.DrawImage(source,0,0,newbitmap.Width,newbitmap.Height,....自己补充); C#小白求助、如何写一个WINFORM的控件,拖出来就能用的那种 关于扫描二维码识别问题 淘宝网的自动确认收货怎么弄的,顺便散分。 是什么原因 ** Why C#的WinForm的程序部署安装后双击运行没反应?? 高手帮忙弄个正则 C#高级编程第三版(P300) 应用程序域 windows mobile 6 通过httpwebrequest 调用web api 接口获取cookie的问题 C# DataGridView 数据填充问题 winform 设置窗体透明 但鼠标不穿透 怎么样用编程实现像下面这个连接地址?求大神! C# [重新登陆功能]与[X关闭]功能冲突,欲知详情,请点击我
Graphics g=Graphics.FromImage(newbitmap);
g.DrawImage(source,0,0);
g.Dispose();
newbitmap.Save("");
newbitmap.Dispose();
Graphics g = Graphics.FromImage(bmp);
Rectangle aaa = new Rectangle(0, 0, 2, 2);
g.DrawImage(bmp, 0, 0, aaa, GraphicsUnit.Pixel);
bmp.Save(@"E:\4.1\209\mobile1.jpg", System.Drawing.Imaging.ImageFormat.Bmp);
目前写成这样 没用 求该
Bitmap source = new Bitmap(@"E:\4.1\209\mobile.jpg");Bitmap newbitmap=new Bitmap(source.Width,source.Height/2);
Graphics g=Graphics.FromImage(newbitmap);
g.DrawImage(source,0,0);
g.Dispose();newbitmap.Save(@"E:\4.1\209\mobile1.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
newbitmap.Dispose();
source.Dispose();
g.DrawImage(source,0,0,newbitmap.Width,newbitmap.Height,....自己补充);