I am trying to find a way to crop large TIFF images in .NET. In particular, I am trying to perform this operation on GeoTiff, TIFF, which allows you to embed geo-referencing information. For those who are not familiar with this type of dataset, it is fully compatible with TIFF 6.0 and usually has a huge size; many times in the gigabyte range.
I tried with the System.Windows.Media.Imaging namespace to try to complete this task. However, the size of the trimmed tiff causes errors in memory. Can someone please give me some information showing how to crop an image without reading the input image into memory at the beginning?
FYI - I fully understand that GDAL is more than capable of this task. However, without going into unnecessary details, deploying GDAL with my application is currently not an option for several reasons, so my desire is to do this using my own .NET classes. However, if there are other third-party .NET libraries that might be useful, I'm all ears.
source share