Windows XP上的System.Drawing.Image.FromStream()“参数无效”

时间:2013-03-18 14:20:28

标签: c#

以下在我的Windows 7开发机器上工作正常,但是当在Windows XP上运行时,我得到并在最后一行说明“参数无效”的异常?

private string base64String = "AAABAAQAEBAAAAAAAABoBQAARgAAABAQAAAAAAAAaAMAAK4FAAAgIAAAAAAAAKgIAAAWCQAAICAAAAAAAACoDAAAvhEAACgAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAAAAAAAAACmyaQAocifAKDGnQCexJsAl8CUAJe+lACRvI4AjrqKAIm3hgCFsoEAha6CAIKyfgB6sHYAfK15AHqudgB2rXMAcKJsAG6qagBup2kAaqZlAGejYgBjol4AZ59jAGWWYQBimV4AX55bAFiZUwBekVsAXJdXAFGYTABdi1oATZZJAEqSRABGkEAARJA+AEOOPQBEhj8AOIkxAD6HOAA7hjUANoMwAC2CJwBCfz0AN30zADdrNAAreiUAKnElACZ1IAAvaysAKG8iACZoIAAkdh4AIW8cACZfIwAfbxkAHW0XAB1gGAAXYBEAEmQOAB1cGQAcXRYAHVQaABdbEgATUxAAEU8OABBHDQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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imBIimBIiBfGxMuERAQEE9PT15eXl5eXl5eXl5eXlZWVkBAQEBAQE9PTwAAAAAAAHmwdXmwdXmwdXmwdYO2f3mwdXmwdQAAAAAAAAAAAAAAAHmwdTOHLCmBIimBIimBIimBIimBIimBIih7IRtKFxg+FRg+FRg+FR9FGyZRIzFpLTdvM0JxPgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIO2fymBIimBIimBIimBIimBIimBIimBIimBIimBIimBIj2NN1GZTHmwdY28iqHHngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGWkYCmBIimBIimBIimBIimBIimBIit3JXmwdQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHmwdTOHLCmBIimBIix/JW+qa3mwdQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHmwdXmwdXmwdXmwdQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///////n////x////8f////H////x////4f///+H////h////4P///+D////A////wH///8B////APwf/wDgD/8AAB//AAP//wAP/P8AP/h+AH/wAAB/8AAAf/AAAH/wAAAf+AGAAAwHgAAf/8AAP//gD///8B////h///////";

byte[] bytes = Convert.FromBase64String(base64String);
System.IO.MemoryStream ms = new System.IO.MemoryStream(bytes);
System.Drawing.Image b = System.Drawing.Image.FromStream(ms, false, false);

这个base64字符串字符串在两个操作系统上都能正常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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A/v7+/v7+/ggD/v7+/v7+/v7+/v7+/gAkDf7+/v7+/v7+/v7+/v4BNxj+/v7+/v7+/v7+/v7+AzQY/v7+/v7+/v7+/v7+/hA6F/7+/v7+/v7+/v7+/v4TOh7+/v7+/v7+/v7+/v7+ETc9Cf7+/v7+/v7+/v7+/g8tQR7+AxYcFhP+/v7+/v4MJTg1KjYtGg4GCwj+/v7+FCkvPDEUA/7+/iswCgkbKjMpMzEF/v7+/v4pLjs7OS0jHy1AEP7+/v7+GRQdISAVDxMjPywJAgMDBv4HDg8DAP4PEyY+Pi0oJxT+/v7+/v7+BxQUIiALAwL+/v7+/v7+/v4EEAn+/v7+/v5/AAD8fwAA/H8AAPx/AAD8fwAA/H8AAPw/AAD8IAAA/AAAADwHAAAAHwAAAB8AAAAAAACCAAAA/gEAAP8fAAA="

2 个答案:

答案 0 :(得分:3)

XP真的让人感觉很长。它缺少的一件事是gdiplus.dll的1.10版,这是对Vista首次发布的GDI +的更新。该版本中有很多修复,现在它实际上支持ImageFormat.Icon。

您的图片数据代表.ico文件。请改用Icon(Stream)构造函数。您可能仍然有24bpp图标的问题,我无法再检查它。

答案 1 :(得分:0)

using (MemoryStream ms = new MemoryStream())
    {
        image.Save(ms,System.Drawing.Imaging.ImageFormat.Jpeg);
        ms.Seek(0,0);
        byte[] data = new byte[0];
        data = ms.ToArray();          
    }

我想访问support.how以外的数据