我有一个 XML 文件,其中包含一个字节数组作为字符串。(微软徽标 Gif 图像)
<CustomerLogo1>R0lGODlhbAKrAYcAAP///3Nzc/JQIv+5AX+6AAGk7+vr63Jycmtra3BwcGpqanFxcW5ubmxsbJmZmXR0dG1tbQKk72lpaf7+/m9vb9LS0v+1APNaL/FHFhCp8MbGxnx8fO7u7np6eubm5vj4+Orq6v7//5iYmHl5eby8vODg4Iq/IEe88/+/IP+3AHu4AACf76SkpPaAXwCg7v+9EH+7APX56Xm2AP/KQUu99P/56eLi4oe+D5/LQPZ+XPFQIni3AIeHh//LR6LMR5ubm/39/b29vXV1dXt7e9PT0/T09PLy8pSUlPf394CAgPv7+/Dw8Ojo6Pr6+vX19ZOTk3d3d+np6Xh4eM7Ozu3t7a+vr/Pz8+Pj4/z8/NfX17Ozs/Hx8YGBgZycnNHR0X19fZ6enrGxsfn5+efn5+Hh4ZKSksTExO/v77e3t6enp8rKymhoaIyMjHZ2dp2dnYiIiMXFxZeXl97e3mFhYbW1tY+Pj8nJyYKCgqKiouzs7LKysv/GM8LCwpXGMqCgoH9/f9TU1H5+ftbW1oODg7u7u8fHx8/Pz4WFhdnZ2fb29ouLi9zc3JWVldra2tvb24aGhtjY2JGRkd3d3aurq+Tk5OXl5aioqMvLy62trcHBwcPDw2RkZM3Nzb+/v8jIyJCQkKmpqaWlpcDAwGZmZomJibi4uLq6urm5uaqqqoSEhK6urqysrLa2tszMzN/f376+vpaWlpqamo6OjoqKiv///tDQ0NXV1Y2NjVTB9Qyo8HS0AP/NTBGp8KHMRv+yAP+6D/JSJP65AfeHZ/FIF//KQv7//v7KRv/+/vb56v+8Fky99PiiiEO485/LQqLMRoO8DwCf7vNkO//56P/PW6jRW/JaL7jYcv+5AvZ+Xf7+//JQI/T56f/IRPE+CQKk7ky88x6u8YC6AXvN9p/LQaXOS//46fNYLPJRI//YdP65AHi2APR6V/V3VHm3AIO9Fv7LR6LNRoe/Dw+m8P/56v/554G6D53KQvP56Pf67v767Z7KRUS58gC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V/iF//OGd+J4QYf4iC90xrD4i8f4jNf4jef4jvf4jwf5kBf5kSf5kjf5k0f5lFf5lWf5lnf5l4f5mJf5maf5mm95isf5nLczBwBWhOD5hADWoP95nx96nu95o/d5oHeIo096ogf6oXf6pz/6qRf6ntd5kw76ps96ANh6pm/6r1f6rVeIny96rTd7rj97pUf7tVf7q0dpq1/7rid6q6f6p18IuL97tJf7sYd6se97rf97t3/7s9/7NqP7th/7xAf7ry/8pPd6uG98xRd8rKf7yld7r+f6oof6xc/7tA/8qZd6vkd8tp987Q4IADs=</CustomerLogo1>
当我加载 XML 时,我使用以下函数将图像拉入
static byte[] GetBytes(string str)
{
byte[] bytes = new byte[str.Length * sizeof(char)];
System.Buffer.BlockCopy(str.ToCharArray(), 0, bytes, 0, bytes.Length);
return bytes;
}
IE
CustomerLogo1 = GetBytes(xmlDoc.ChildNodes[1].ChildNodes[8].InnerText);
然后我使用以下函数将其读回
public Bitmap byteArrayToImage(byte[] byteArrayIn)
{
MemoryStream mem = new MemoryStream(byteArrayIn);
return new Bitmap(mem);
}
但是我在新的 Bitmap(mem) 评论中收到错误“参数无效”
我不明白是读取它的问题,还是写入磁盘的问题。我正在使用以下函数来编写字节数组,这是 XML 类的一个参数。
public byte[] imageToByteArray(Bitmap bmp)
{
TypeConverter converter = TypeDescriptor.GetConverter(typeof(Bitmap));
return (byte[])converter.ConvertTo(bmp, typeof(byte[]));
}
要保存 XML,然后使用
public string SettingsToXMLString(Settings settings)
{
StringWriter Output = new StringWriter(new StringBuilder());
XmlSerializer s = new XmlSerializer(settings.GetType());
s.Serialize(Output, settings);
return Output.ToString();
}
非常感谢安德鲁