修改用户头像数据类型

This commit is contained in:
Mattuy Lee
2018-12-24 17:54:50 +08:00
parent f28ad69067
commit 612a5b8645
4 changed files with 80 additions and 85 deletions
+3 -5
View File
@@ -222,11 +222,9 @@ namespace Interact
//将头像数据转换到字符数组
if (userInfo.Photo != null)
{
MemoryStream memStream = new MemoryStream();
userInfo.Photo.Save(memStream, userInfo.Photo.RawFormat);
photoData = new byte[memStream.Length];
memStream.Seek(0, SeekOrigin.Begin);
memStream.Read(photoData, 0, photoData.Length);
photoData = new byte[userInfo.Photo.Length];
userInfo.Photo.Seek(0, SeekOrigin.Begin);
userInfo.Photo.Read(photoData, 0, photoData.Length);
}
//构建数据包
JsonUserInfoHead jsonObj = new JsonUserInfoHead()