C# Image.Clone Out of Memory Exception

前端 未结 6 713
礼貌的吻别
礼貌的吻别 2020-11-28 11:15

Why am I getting an out of memory exception?

So this dies in C# on the first time through:

splitBitmaps.Add(neededImage.Clone(rectDimensions, neededI

6条回答
  •  攒了一身酷
    2020-11-28 11:25

    Clone() may also throw an Out of memory exception when the coordinates specified in the Rectangle are outside the bounds of the bitmap. It will not clip them automatically for you.

提交回复
热议问题