Attempt the Limit With Finite Reduction
JPG and WebP search quality at the starting dimensions, then downscale proportionally when needed. The process stops after bounded attempts and reports any remaining size excess.
- Retains image proportions as pixels are reduced
- Avoids an endless search for an extreme ceiling
- Provides the actual result rather than implying guaranteed success