首页 > 其他分享 >【Image】System.IO.FileFormatException:“无法对此图像进行解码。该图像头可能已损坏。”

【Image】System.IO.FileFormatException:“无法对此图像进行解码。该图像头可能已损坏。”

时间:2022-11-20 03:44:26浏览次数:48  
标签:FileFormatException 图像 thumbnailImage System IO 已损坏

 

 

 

 问题

 

 答案

thumbnailImage.Read(bytes, 0, length);
thumbnailImage.Seek(0, SeekOrigin.Begin);//添加这句就可以了
userInfo.Photo = bytes;

 

标签:FileFormatException,图像,thumbnailImage,System,IO,已损坏
From: https://www.cnblogs.com/cdaniu/p/16907821.html

相关文章