pub(crate) fn fit(
first: u32,
share: u64,
write: &mut dyn FnMut(u32, u8) -> Option<u64>,
) -> Option<(u32, u8)>Expand description
A picture’s long side and quality that fit its share (decision 6):
first its long side at first (1,600 pixels, less as its carrier
advises, never more than its own) at quality 85; over its share, the
quality searched down to 50, the interval halved four times at most;
still over at 50, a quarter smaller and searched again; never under 480
pixels. write writes the picture at a long side and a quality and says
its size (none: not written). None: it cannot be made small enough.