nextShrinkStep function
One 0.75 shrink step of the inline-image shrink loop (a dimension already at 1 stays there).
Implementation
(int, int) nextShrinkStep(int width, int height) =>
(width == 1 ? 1 : width * 3 ~/ 4, height == 1 ? 1 : height * 3 ~/ 4);