我试图将Base64String转换为需要在本地保存的图像.
目前,我的代码能够保存图像,但是当我打开保存的图像时,它会显示"无效图像".

码:
try
{
using (var imageFile = new StreamWriter(filePath))
{
imageFile.Write(resizeImage.Content);
imageFile.Close();
}
}
Run Code Online (Sandbox Code Playgroud)
的Content是一个string其中包含的Base64字符串对象.