no resize when source image's width equals target image's width. the condition in the method scaleImageIncrementally if (prevCurrentWidth == currentWidth || prevCurrentHeight == currentHeight) break; is true,so break out; no resize when source image's height equals target image's height.