異常詳細信息:System.ArgumentException:參數無效。該方法的c#參數無效
Bitmap result = new Bitmap(7016, 9921);
部分:
public Bitmap ResizeBitmap(Bitmap b, int nWidth, int nHeight)
{
Bitmap result = new Bitmap(nWidth, nHeight);
nWidth和nHeight參數有明確的價值觀和仍然相同的錯誤拋出同樣的錯誤,所以我取代它,它似乎對人數較少的工作雖然,但:
http://msdn.microsoft.com/en-us/library/7we6s1x3.aspx
似乎並沒有表明有什麼限制?我試過了:
Bitmap result = new Bitmap(nWidth, nHeight);
Bitmap result = new Bitmap(7016, 9921);
Bitmap result = new Bitmap((int)7016, (int)9921);
所有的失敗都是一樣的。
類似:http://stackoverflow.com/questions/6333681/c-parameter-is-not-valid-creating-new-bitmap – AakashM
由於可用內存而發生異常。 Piotr可能有更多的記憶。 – RvdK
檢查這個http://stackoverflow.com/questions/5801652/bitmap-while-assigning-height-width-crashes/5802113#5802113 ..類似於你現在的 – V4Vendetta