For example try to crop image with size 2000x1300 to 1920x1080.
The result will be image with size of 1919x1279.
This is fixing the problem on line 300:
--$optimalWidth = $dimensionsArray['optimalWidth'];
--$optimalHeight = $dimensionsArray['optimalHeight'];
++$optimalWidth = ceil($dimensionsArray['optimalWidth']);
++$optimalHeight = ceil($dimensionsArray['optimalHeight']);
For example try to crop image with size 2000x1300 to 1920x1080. The result will be image with size of 1919x1279.
This is fixing the problem on line 300: --$optimalWidth = $dimensionsArray['optimalWidth']; --$optimalHeight = $dimensionsArray['optimalHeight']; ++$optimalWidth = ceil($dimensionsArray['optimalWidth']); ++$optimalHeight = ceil($dimensionsArray['optimalHeight']);