$im = imagecreatefrompng('a.png');
$size = min(imagesx($im), imagesy($im));
$im2 = imagecrop($im, ['x' =>112, 'y' => 85, 'width' => $size-128, 'height' => $size-88]);
if ($im2 !== FALSE) {
imagepng($im2, 'example-cropped.png');
}