Use a Bounded Attempt at an Extreme Ceiling
JPG and WebP try their allowed quality range before proportional downscaling. The process stops after finite attempts and reports the actual result if the limit remains out of reach.
- Avoids an endless attempt to reach a tiny allowance
- Retains source proportions when dimensions decrease
- Shows when the generated file is still above target