100求个提示,进者有分!! 地址:http://www.codeproject.com描述:很多非官方的中小型示例源代及文章,相当全面,基本上我们想要的各种方面的资料都可以在此处查找。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 .net里 是有关于图形编程的类。 GDI+应该不太难 图形处理方面,.net还是不错的 .net里有图形编程的类,你可以参考一下MSDN. 对,看看GDI+和图像图形学的知识。 采用GDI+吧,应该可以处理这个问题的! 这个嘛,很简单。我师傅用一个下午就做个一个和photoshop差不过的软件,用的是vb。他去图书馆看了一下,滤镜的算法后就做出来了 btut2004(《电子产品世界》程序员,申请做C#,Asp.net版主) 你的师傅真N Bitmap bmp = new Bitmap(string filename);//加载图片Graphics g = Graphics.FromImage(bmp);//获取图片的绘图表面//// 添加对文字的绘制函数// 我师傅是牛啊,就是因为他,我开始觉得每个程序员都要像他那样。后来才知道,像他那样的有几人。你先看看gdi编程吧。 public void WaterMark(Stream inputStream, string fileName, string Name, string picPath){ string WorkingDirectory = HttpContext.Current.Request.PhysicalApplicationPath + "\\" + picPath; Stream PhotoStream = inputStream; string WaterName = Name; string PhotoFinalName = fileName; //创建一个将要产生水印的图象对象 System.Drawing.Image imgPhoto = System.Drawing.Image.FromStream(PhotoStream); int phWidth = imgPhoto.Width; int phHeight = imgPhoto.Height; //创建一个水印的图象对象 System.Drawing.Image imgWater = new Bitmap(WorkingDirectory + "\\" + WaterName); int wmWidth = imgWater.Width; int wmHeight = imgWater.Height; //建立位图 Bitmap bmWater = new Bitmap(PhotoStream); bmWater.SetResolution(imgPhoto.HorizontalResolution, imgPhoto.VerticalResolution); //将此位图载入到图片对象中 Graphics grWater = Graphics.FromImage(bmWater); ImageAttributes imageAttributes = new ImageAttributes(); //这个颜色操作用来设置水印的不透明度 //产生一个5x5的矩阵来调节RGB颜色,通过设置一个3行3列的数组从0.0f到0.3f来得到不透明度的程度 float[][] colorMatrixElements = { new float[] {1.0f, 0.0f, 0.0f, 0.0f, 0.0f}, new float[] {0.0f, 1.0f, 0.0f, 0.0f, 0.0f}, new float[] {0.0f, 0.0f, 1.0f, 0.0f, 0.0f}, new float[] {0.0f, 0.0f, 0.0f, 0.3f, 0.0f}, new float[] {0.0f, 0.0f, 0.0f, 0.0f, 1.0f}}; ColorMatrix wmColorMatrix = new ColorMatrix(colorMatrixElements); imageAttributes.SetColorMatrix(wmColorMatrix, ColorMatrixFlag.Default, ColorAdjustType.Bitmap); //这里设置水印离图片底部10个象素,离左边10个象素 int xPosOfWm = ((phWidth - wmWidth)-10); int yPosOfWm = 10; grWater.DrawImage(imgWater, new Rectangle(xPosOfWm,yPosOfWm,wmWidth,wmHeight), //设置位置 0, // 要画图的X向深度 0, // 要画图的Y向深度 wmWidth, // 水印的宽度 wmHeight, // 水印的高度 GraphicsUnit.Pixel, // 单位 imageAttributes); // 图象属性对象 //用新图片替换原始图片 imgPhoto = bmWater; grWater.Dispose(); //保存新图片到系统文件中 imgPhoto.Save(WorkingDirectory + "\\" + PhotoFinalName, ImageFormat.Jpeg); imgPhoto.Dispose(); imgWater.Dispose(); PhotoStream.Close();} 不知道上面的函数对你有没有用! 一个按钮怎样实现2个功能? 如何部署ASP.NET2.0程序网站程序?开发时采用是文件形式,不是Http? 做个系统钩子,钩关机行不,请各位附点代码,谢谢!! 没有分了,不要脸地问一个关于录音的问题 listView的选中项问题 请问如何去掉datagridview最左边自动生成的那列啊 [求助]有关c#结构体的问题 请教Sqlcommand类中的一个用法 怎么把一个字符串转成16个字节的数组? Request.UserHostName问题? 兄弟们,给一个 C# 明码加密的 RSA 的例子,急 谁能提供一些关于界面编程方面的资料、代码
应该不太难 图形处理方面,.net还是不错的
我师傅用一个下午就做个一个和photoshop差不过的软件,用的是vb。
他去图书馆看了一下,滤镜的算法后就做出来了
你的师傅真N
Graphics g = Graphics.FromImage(bmp);//获取图片的绘图表面
//
// 添加对文字的绘制函数
//
后来才知道,像他那样的有几人。你先看看gdi编程吧。
{
string WorkingDirectory = HttpContext.Current.Request.PhysicalApplicationPath + "\\" + picPath;
Stream PhotoStream = inputStream;
string WaterName = Name;
string PhotoFinalName = fileName; //创建一个将要产生水印的图象对象
System.Drawing.Image imgPhoto = System.Drawing.Image.FromStream(PhotoStream); int phWidth = imgPhoto.Width;
int phHeight = imgPhoto.Height; //创建一个水印的图象对象
System.Drawing.Image imgWater = new Bitmap(WorkingDirectory + "\\" + WaterName);
int wmWidth = imgWater.Width;
int wmHeight = imgWater.Height; //建立位图
Bitmap bmWater = new Bitmap(PhotoStream);
bmWater.SetResolution(imgPhoto.HorizontalResolution, imgPhoto.VerticalResolution); //将此位图载入到图片对象中
Graphics grWater = Graphics.FromImage(bmWater); ImageAttributes imageAttributes = new ImageAttributes(); //这个颜色操作用来设置水印的不透明度
//产生一个5x5的矩阵来调节RGB颜色,通过设置一个3行3列的数组从0.0f到0.3f来得到不透明度的程度 float[][] colorMatrixElements = {
new float[] {1.0f, 0.0f, 0.0f, 0.0f, 0.0f},
new float[] {0.0f, 1.0f, 0.0f, 0.0f, 0.0f},
new float[] {0.0f, 0.0f, 1.0f, 0.0f, 0.0f},
new float[] {0.0f, 0.0f, 0.0f, 0.3f, 0.0f},
new float[] {0.0f, 0.0f, 0.0f, 0.0f, 1.0f}};
ColorMatrix wmColorMatrix = new ColorMatrix(colorMatrixElements);
imageAttributes.SetColorMatrix(wmColorMatrix, ColorMatrixFlag.Default, ColorAdjustType.Bitmap); //这里设置水印离图片底部10个象素,离左边10个象素
int xPosOfWm = ((phWidth - wmWidth)-10);
int yPosOfWm = 10; grWater.DrawImage(imgWater,
new Rectangle(xPosOfWm,yPosOfWm,wmWidth,wmHeight), //设置位置
0, // 要画图的X向深度
0, // 要画图的Y向深度
wmWidth, // 水印的宽度
wmHeight, // 水印的高度
GraphicsUnit.Pixel, // 单位
imageAttributes); // 图象属性对象 //用新图片替换原始图片
imgPhoto = bmWater; grWater.Dispose(); //保存新图片到系统文件中
imgPhoto.Save(WorkingDirectory + "\\" + PhotoFinalName, ImageFormat.Jpeg);
imgPhoto.Dispose();
imgWater.Dispose();
PhotoStream.Close();
} 不知道上面的函数对你有没有用!