C#±È½ÏͼƬÊÇ·ñÒ»ÖÂ
/// <summary>
/// ±È½ÏÁ½·ùͼƬÊÇ·ñÒ»Ö£¨Ê¹ÓÃMarshal.ReadByte·½Ê½£©
/// </summary>
/// <param name="bitmap1">ͼƬ1</param>
/// <param name="bitmap2">ͼƬ2</param>
/// <returns>Èç¹ûÁ½·ùͼƬÏàͬ£¬·µ»Ø0£»Èç¹ûͼƬ1СÓÚͼƬ2£¬·µ»ØСÓÚ0µÄÖµ£»Èç¹ûͼƬ1´óÓÚͼƬ2£¬·µ»Ø´óÓÚ0µÄÖµ¡£</returns>
public static int BitmapCompare3(Bitmap bitmap1, Bitmap bitmap2)
{
int result = 0; //¼ÙÉèÁ½·ùͼƬÏàͬ
if (bitmap1 == null || bitmap2 == null)
return -1;
if (bitmap1.Width == bitmap2.Width && bitmap1.Height == bitmap2.Height)
{
BitmapData bmd1 = bitmap1.LockBits(new Rectangle(0, 0, bitmap1.Width, bitmap1.Height), ImageLockMode.ReadOnly, bitmap1.PixelFormat);
BitmapData bmd2 = bitmap2.LockBits(new Rectangle(0, 0, bitmap2.Width, bitmap2.Height), ImageLockMode.ReadOnly, bitmap2.PixelFormat);
IntPtr start1 = bmd1.Scan0;
IntPtr start2 = bmd2.Scan0;
int sizeOfByte = Marshal.SizeOf(typeof(byte));
for (int i = 0; i < sizeOfByte * bmd1.Stride * bitmap1.Height; i++)
{
byte b1 = Marshal.ReadByte(start1, i);
byte b2 = Marshal.ReadByte(start2, i);
if (b1 != b2)
{
result = (int)(b1 - b2);
break;
}
}
bitmap1.UnlockBits(bmd1);
bitmap2.UnlockBits(bmd2);
}
else if (bitmap1.Width != bitmap2.Width)
{
result = bitmap1.Width - bitmap2.Width;
}
else if (bitmap1.Height != bitmap2.Height)
{
result = bitmap1.Height - bitmap2.Height;
}
return result;
}
==================================================================================
/// <s
Ïà¹ØÎĵµ£º
C#ÓëFlash½»»¥ £¨×ª×ÔСÀÚÔÚÏߣ©
C#ÓëFlash½»»¥
Ç°¶ÎÈÕ×Ó¹«Ë¾ÒªÇó×öÒ»¸öC#ÓëFlash½»»¥µÄ¶«Î÷£¬ÓÃÀ´C#Óë¶ÌÐÅèͨѶ½«Êý¾Ý´«µ½FlashÉÏÏÔʾÓë²Ù×÷µÄÓ¦Óá£
µÚÒ»²½C#Ìí¼Ó×é¼þ
´ò¿ªVS2005-¹¤¾ß-Ñ¡Ôñ¹¤¾ßÏäÏî-COM×é¼þ-Ñ¡ÔñShockwave Flash Object-È·¶¨
Ìí¼ÓºÃ×é¼þÍù³¡¾°ÉÏÍÏ·Å£¬Èç¹ûÌáʾע²áÐèÇó×¢²á
c# ×¢²á¿Ø¼þ-ÔÚÔËÐÐÊä ......
ÔÚÊý¾Ý¿â±à³ÌÖУ¬³£»áÓöµ½Òª°ÑÊý¾Ý¿â±íÐÅÏ¢µ¼ÈëExcelÖУ¬ ÓÐʱÔòÊÇ°ÑExcelÄÚÈݵ¼ÈëÊý¾Ý¿âÖС£ÔÚÕâÀ½«½éÉÜÒ»ÖֱȽϷ½±ã¿ì½ÝµÄ·½Ê½£¬Ò²ÊDZȽÏÆÕ±éµÄ¡£Æäʵ£¬Õâ·½·¨Äã²¢²»Ä°Éú¡£ÔÀíºÜ¼òµ¥£¬°ÑÊý¾Ý¿â±í»òExcelÄÚÈݶÁÈ¡µ½datasetÀàÐ͵ıäÁ¿ÖУ¬ÔÙÖð ......
//ÒÔÏÂÀ´×Ô:http://msdn.microsoft.com/zh-cn/library/sf985hc5.aspx
abstract£¨C# ²Î¿¼£©
¸üУº2007 Äê 11 ÔÂ
abstract ÐÞÊηû¿ÉÒÔºÍÀà¡¢·½·¨¡¢ÊôÐÔ¡¢Ë÷ÒýÆ÷¼°Ê¼þÒ»ÆðʹÓá£ÔÚÀàÉùÃ÷ÖÐʹÓà abstract ÐÞÊηûÒÔָʾij¸öÀàÖ»ÄÜÊÇÆäËûÀàµÄ»ùÀà¡£±ê¼ÇΪ³éÏó»ò°üº¬ÔÚ³éÏóÀàÖеijÉÔ±±ØÐëͨ¹ý´Ó³éÏóÀàÅÉÉúµÄÀàÀ´ÊµÏÖ¡£
ʾÀý ......
±¾ÊéÊÇ΢Èí¼¼ÊõÅàѵͳ±à½Ì²ÄÖ®Ò»£¬¶Ô±à³ÌÓïÑÔC#½øÐÐÁËÏêϸµÄ½éÉÜ¡£ C#ÊÇ»ùÓÚ΢ÈíÏÂÒ»´ú²Ù×÷ƽ̨£®NETµÄȫеÄÃæÏò¶ÔÏóµÄ³ÌÐòÉè¼ÆÓïÑÔ¡£ËüÔÚ±£³ÖÁËC+ÖÐÊìϤµÄÓï·¨µÄͬʱ£¬Ìí¼ÓÁË´óÁ¿µÄ¸ßЧ´úÂëºÍÍêÈ«ÃæÏò¶ÔÏóÌØÐÔ£¬ÒÔ¼°¸ü¸ßµÄ¿É¿¿ÐԺͰ²È«ÐÔ¡£C#ÓïÑÔ½«ÔÚ±£³ÖC£¯C++Áé»îÐԵĻù´¡ÉÏΪ³ÌÐòÔ±´øÀ´¸ü¸ßЧµÄ¿ª·¢·½Ê½¡£Ëü²»½öÄÜÓÃÓ ......