2016年4月25日
摘要: 内存对齐原则: 1.数据成员对齐规则:struct, union的数据成员,第一个数据成员放在offset为0的地方,之后的数据成员的存储起始位置都是放在该数据成员大小的整数倍位置。如在32bit的机器上,int的大小为4,因此int存储的位置都是4的整数倍的位置开始存储。 2.结构体作为数据成员的 阅读全文
posted @ 2016-04-25 17:26 C..J 阅读(174) 评论(0) 推荐(0) 编辑
2015年11月13日
摘要: public void gifplay(string path,ref Panel panel) { try{ Bitmap animatedGif = new Bitmap(path ); Graphics g = p... 阅读全文
posted @ 2015-11-13 13:56 C..J 阅读(377) 评论(0) 推荐(0) 编辑
摘要: //字符画// 通过计算rowSize*colSize区域的亮度平均值用一个字符替代 public static String BitmapConvert(Bitmap bitmap, int rowSize, int colSize) { Stri... 阅读全文
posted @ 2015-11-13 13:29 C..J 阅读(571) 评论(0) 推荐(0) 编辑
摘要: /// Calculate the graphics path that representing the figure in the bitmap /// excluding the transparent color which is the top left pixel. ... 阅读全文
posted @ 2015-11-13 13:23 C..J 阅读(199) 评论(0) 推荐(0) 编辑
摘要: using System.Runtime.InteropServices; public class Win32 { public const Int32 AW_HOR_POSITIVE = 0x00000001; // 从左到右打开窗口 public const Int32 AW_HOR_NE... 阅读全文
posted @ 2015-11-13 13:21 C..J 阅读(198) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.IO;using System.Windows.Forms;using System.Runtime.InteropServices;using System.Reflection;... 阅读全文
posted @ 2015-11-13 13:20 C..J 阅读(725) 评论(0) 推荐(0) 编辑
摘要: // 在这里写一些可能消耗内存的代码,例如,如果想了解创建一个GcMultiRow软件需要多少内存可以执行以下代码long start = GC.GetTotalMemory(true);var gcMulitRow1 = new GcMultiRow();GC.Collect();// 确保所有内... 阅读全文
posted @ 2015-11-13 13:16 C..J 阅读(216) 评论(0) 推荐(0) 编辑
摘要: int x,y; void MainFormMouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) ... 阅读全文
posted @ 2015-11-13 13:14 C..J 阅读(137) 评论(0) 推荐(0) 编辑
摘要: // /// 处理图片透明操作 /// /// 原始图片 /// 透明度(0.0---1.0) /// private Image TransparentImage(Image srcImage, float opacity) { float[][] nArray ={... 阅读全文
posted @ 2015-11-13 13:03 C..J 阅读(167) 评论(0) 推荐(0) 编辑
2015年9月23日
摘要: 最近挺多人找高斯算法,本人贴上一个高斯模糊算法类,希望可以帮助到大家。算法的效率还是可以接受的。 1 #region 高斯模糊算法 2 /// 3 /// 高斯模糊算法 4 /// 5 using System ; 6 using System .Drawing ; 7 publi... 阅读全文
posted @ 2015-09-23 13:11 C..J 阅读(398) 评论(0) 推荐(0) 编辑