Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
You could just go through all layers and compute min/max based on that, but that won't work very nicely when in the future we decouple layer size and tile size from the map.
But, I just checked what GIMP does and actually it crops the image only based on the currently selected layer. So, surely that is acceptable behavior as well.
Then, the only remaining question is how to treat object layers. We could either just not support this option for now, or determine the boundaries of the objects on the current object layer and then somehow mapping that also to any potential tile layers. I think at first we could just disable this action when an object layer is selected.