你好 wjm,
这段代码也是有时出错,有时正常运行?
我机器上面跑了一个10000*10000的图片大概25M,可以正常跑完,尝试多次也不会出现错误,你的错误信息是什么?
我觉得应该是机器性能的问题了吧,你可以通过Profile工具来看看是否能得到什么信息。
--James
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.