我改變Automatic Image Stitching with Accord.NET應用縫合多個文件。
我把for loop
放在btnDoItAll
的代碼上,循環將取決於要縫合多少圖像。
我在循環結尾加入了裁剪代碼。你可以看到here。
在這部分中出現的錯誤顯示爲OutOfMemoryException was unhandled - Out of memory
。OutOfMemoryException異常是未處理
croppedBitmap = croppedBitmap.Clone(new Rectangle(MinWidth, 0, (int)croppedBitmap.Width - MinWidth - MaxWidth, 1323), System.Drawing.Imaging.PixelFormat.DontCare);
希望你能再次幫助我。
The output from debug was these:
Bitmap-width: 877
Bitmap-height: 1325
Width: -1
MinWidth: 877
A first chance exception of type 'System.OutOfMemoryException' occurred in System.Drawing.dll
可能的重複[是否有原因Image.FromFile拋出一個無效的圖像格式OutOfMemoryException?](http://stackoverflow.com/questions/2610416/is-there-a-reason-image-fromfile-throws -out-outofmemoryexception-for-an-invalid-i) – BrokenGlass 2012-02-12 18:41:25