C# Class TencentYoutuYun.SDK.Csharp.Common.Utility

通用方法
Show file Open project: TencentYouTu/CSharp_sdk

Public Methods

Method Description
Base64Img ( string Base64String ) : Image

Base64转Image

ByteArrToStr ( byte byteArray ) : string

字节数组转字符串

GetWebImage ( string url ) : Bitmap

获取网络图片

ImgBase64 ( string path, bool isWebImg = false ) : string

图片转Base64

JoinByteArr ( byte byte1, byte byte2 ) : byte[]

字节数组合并

StrToByteArr ( string str ) : byte[]

字符串转字节数组

UnixTime ( double expired ) : string

UnixTime时间戳

Method Details

Base64Img() public static method

Base64转Image
public static Base64Img ( string Base64String ) : Image
Base64String string Base64String
return Image

ByteArrToStr() public static method

字节数组转字符串
public static ByteArrToStr ( byte byteArray ) : string
byteArray byte
return string

GetWebImage() public static method

获取网络图片
public static GetWebImage ( string url ) : Bitmap
url string URL地址
return System.Drawing.Bitmap

ImgBase64() public static method

图片转Base64
public static ImgBase64 ( string path, bool isWebImg = false ) : string
path string 图片路径
isWebImg bool 是否网络图片 默认 false
return string

JoinByteArr() public static method

字节数组合并
public static JoinByteArr ( byte byte1, byte byte2 ) : byte[]
byte1 byte
byte2 byte
return byte[]

StrToByteArr() public static method

字符串转字节数组
public static StrToByteArr ( string str ) : byte[]
str string
return byte[]

UnixTime() public static method

UnixTime时间戳
public static UnixTime ( double expired ) : string
expired double 有效期(单位:秒)
return string