SoftBasicCalculateStreamMD5 方法 (Bitmap) |
获取内存图片的md5码
Get the MD5 code of the memory picture
命名空间:
HslCommunication.BasicFramework
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public static string CalculateStreamMD5(
Bitmap bitmap
)
Public Shared Function CalculateStreamMD5 (
bitmap As Bitmap
) As String
public:
static String^ CalculateStreamMD5(
Bitmap^ bitmap
)
static member CalculateStreamMD5 :
bitmap : Bitmap -> string
参数
- bitmap
- 类型:System.DrawingBitmap
内存图片
返回值
类型:
StringMd5字符串
示例
下面举例实现获取一个图像的md5码
try
{
Bitmap bitmap = new Bitmap( 100, 100 );
string md5 = SoftBasic.CalculateStreamMD5( bitmap );
Console.WriteLine( md5 );
}
catch (Exception ex)
{
Console.WriteLine( "failed : " + ex.Message );
}
参见