How to avoid bitmap out of memory when working on very large image for ie: 10.000.000 pixel and above
Currently i'm working on a system that load a very large image, with minimum width x heigh >= 10.000.000 pixel. But the ratio of the user's upload image usually do not match our requirement ratio so i have to crop it to proper ratio, but when using System.Drawing bitmap to crop it, i always got SytemOutOfMemory exception. I have try Bitmap.Clone and Graphic.DrawImage with correct RectangleF but no luck. Is there anyways to do this without getting the outofmemory exception or are there any alternatives to System.Drawing library to get this task done easily ? My code to load the image from user