Search Quality Before Shrinking
For JPG and WebP, the compressor first tries quality changes at the current pixel size. If the budget is still out of reach, it reduces both dimensions proportionally.
- Keeps current dimensions when the target is reachable
- Uses a bounded search for a valid encoded result
- Reports when the requested ceiling remains unmet