could we think about an option (checkbox, off by default) in Export , kind of “preference to border” (wording is bad…but you get the idea). In that case, it appears to me that there is not really a lot of if…else. We fix a side (the largest one) and the other is found by applying the aspect ratio + rounding. This way we would reach parity with ImageMagick.
If you want to make a serious feature request, it needs to be done on github.
Sure, I will. But I wanted first to check the validity of my perception of the problem and also the interest to go forward with such a proposal. From from I see, there is little to no interest for that particular feature.