Crop margin incorrectly applied(?)
Commit 291a6608beaafe7c6b61692ccdcc759911c036b7 introduced a margin to the crop feature. However, I *think* that the margin is incorrectly applied, thus making the actually rendered area smaller. I am referring to the following lines: https://github.com/GregoryAM-SP/The-Minecraft-Overviewer/blob/fed92af78752f0cfde9e94abf53ffb56ffba5435/overviewer_core/world.py#L2658-L2667
The margin is added to the *min values and subtracted from the *max values.
On our map, we are using the crop feature to get detailed renderers of several locations. All of these are now cut off at the borders because Overviewer removes 5 chunks at each side.
For example, for one location we have specified the following: "crop": (830, 50, 1250, 500) (= 420x450) but Overviewer actually only renders the following area: (896, 128, 1183, 431) (= 287x303)
Or am I understanding the margin wrong and it is actually intended to make the rendered area smaller? Then, it should be documented ;) Also, it would be great if the margin could also be controlled via the config in case someone wants an exact render.
This is something I've noticed as well, but I've never spent the time to properly dig into it. My debugging config (which is the only config I have which uses crops) has ended up adding/subtracting 80 from each coordinate, eg (-31 - 80, -31 - 80, 31 + 80, 31 + 80) instead of (-31, -31, 31, 31). The
I think I've identified that those changes were made in response to #17 based on the commit timings correlating to the closure of that issue. I don't think that this change was the correct fix for that particular issue, but I also don't know what the correct fix would be. I'm gonna do some digging.
@BafDyce This is indeed related to #17, and the changes you identified were supposed to fix that issue. Unfortunately, a) the issue wasn't actually fixed, and b) the changes made had side effects which you've spotted.
I've put a more in-depth technical description at https://github.com/GregoryAM-SP/The-Minecraft-Overviewer/issues/17#issuecomment-2895656101 if you're interested; I'm not going to repeat myself here.
Are you happy compiling Overviewer yourself to verify the change I'm making? If you are, pull the code from the crop branch. If not, don't worry.
Wow, thanks for the incredibly fast response and initiative to fix this! Sadly, I dont really have the time to look into compiling this myself. Maybe next week but I'm quite confident that your changes should fix the issue^^