My app is a C# program that takes in an extent from the user, then loads GeoTIFFs from a folder that overlap the extent. It layers them according to a simple number on each GeoTIFF, then exports the result based on the user-supplied extent and saves that cropped version to a new file. I use the Global Mapper SDK for this and it works great.
I want to speed up the app by not loading any GeoTIFF which is already "covered" by other data. I notice that the GeoTIFF format has a mask. For example, I can see in the thumbnails for the GeoTIFF files in Windows Explorer a black background with a white foreground that is the actual data.
Is there a way to read this mask into a .NET image or similar? Then I would be maintain a growing bitmap of all masks ORed together, and able to skip loading any GeoTIFF that did not increase the white area. That would greatly reduce the time taken for the GM SDK to do the export because there would be less total layers loaded.