问题描述
你好大师,
我有一个System.IntPtr指向我图像的内存地址(不是
..NET图像)。 br />
我希望将IntPtr指向的图像数据保存到原始数据文件中。我现在的方式是:
$
System.IO.FileStream file = new System.IO.FileStream(fileName,
System.IO.FileMode.Create);
file.Write(byte [],0,...);
file.Close();
但是FileStream.Write占用了我没有的byte []。
如何将IntPtr指向的图像数据保存到文件中?
---------
谢谢
Sharon
Hello gurus,
I have a System.IntPtr pointing to the memory address of my image (not a
..NET image).
I wish to save this image data pointed by the IntPtr to a raw data file. The
way I now to that is:
System.IO.FileStream file = new System.IO.FileStream(fileName,
System.IO.FileMode.Create);
file.Write(byte[], 0, ...);
file.Close();
But the FileStream.Write takes byte[] which I do not have.
How can I save this image data pointed by IntPtr to file?
---------
Thanks
Sharon
推荐答案
这篇关于如何将InPtr保存到原始文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!