12 2010 档案

摘要:处理图片时常用的过程是:读入图片文件并转化为Bitmap - 处理此Bitmap的每个点以得到需要的效果 - 保存新的Bitmap到文件使用C#很方便的就可以把多种格式的图片文件读到Bitmap对象中。一句话就够了,常见的格式都支持,诸如JPEG,BMP,PNG等等。Bitmap bmp = new Bitmap("文件名");然后就是怎么处理这个图片的问题了,与本案无关,pass。最后就是保存。JPEG虽然是有损压缩方案,但是它在缩减文件体积和尽可能好的保留原有信息的矛盾上很好的找到了平衡点,所以在很多情况下成为首选的保存方案。C#当然不会无视这一点,Bitmap类提供了默认的另存为JP 阅读全文
posted @ 2010-12-31 13:53 94cool 阅读(8027) 评论(0) 推荐(0) 编辑
摘要:private void toexcel(DataSet ds, string title) { StringBuilder sb = new StringBuilder(); Response.Clear(); Response.Buffer = false; Response.Charset = "GB2312"; Response.AppendHeader("Content-Disposition", "attachment;filename=" + title + ".xls"); Response.ContentEncoding = System.Text.Encoding.GetE 阅读全文
posted @ 2010-12-30 09:32 94cool 阅读(172) 评论(0) 推荐(0) 编辑
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--file="c:\\temp\test.csv";DataSetds=newDataSet();stringfilePath=file.Substring(0,file.LastIndexOf("\\")+1);using(OleDbConnectionconn=newOleDbConnection(string.Format(@"Provider=Microsoft.Jet.OLEDB.4.0; 阅读全文
posted @ 2010-12-24 11:19 94cool 阅读(610) 评论(0) 推荐(0) 编辑
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--publicvoidExportCSV(DataSetds){try{stringdata="";foreach(DataTabletbinds.Tables){foreach(DataColumncolumnintb.Columns){data+=column.ColumnName+",";}data+="\n";foreach(DataRowrowintb.Rows){foreach(Data 阅读全文
posted @ 2010-12-23 14:04 94cool 阅读(227) 评论(0) 推荐(0) 编辑
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1#regionToVCF2protectedvoidbtn_outvcf_Click(objectsender,EventArgse)3{4stringcode=Request["hid_code"].ToString().Trim(',');5StringBuildersb=newStringBuilder();6if(!string.IsNullOrEmpty(code))7{8string 阅读全文
posted @ 2010-12-23 14:03 94cool 阅读(317) 评论(0) 推荐(0) 编辑
摘要:第一:要核对apache的版本:如果是2.2的话,在配置LoadModule php5_module "D:\Program Files\PHP\php5apache2_2.dll要确定以上的是php5apache2_2.dll 而不是php5apache2.dll第二:在配置PHPIniDir "D:/php"时,要将这个配置放到整个配置文件的最后 阅读全文
posted @ 2010-12-06 23:22 94cool 阅读(517) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示