<?php
GdImage|false imagecrop ( GdImage $image, array $rectangle )
where,
$image = The image identifier
$rectangle = The parameters ARRAY of the rectangle to crop
?>
<?php
echo 'PHP VERSION: ' . PHP_VERSION . '<br><br>';
$org_image = "png/PNG 049 01.png";
$crp_image = "png/PNG 049 01-cropped.png";
$crop_arr = [ "x" => 210, "y" => 43,
"width" => 260, "height" => 367 ];
echo $org_image; ?>
<br><br><img src="<?php echo
$org_image; ?>" alt="<?php echo $org_image; ?>" width="400"><br><br>
<?php
$id_org_img = imagecreatefrompng($org_image);
$arr_org_info = getimagesize($org_image);
echo $arr_org_info[3] . '<br><br><br><br>';
$id_crp_img = imagecrop($id_org_img, $crop_arr );
imagepng ($id_crp_img, $crp_image );
echo $crp_image; ?>
<br><br><img src="<?php echo
$crp_image; ?>" alt="<?php echo $crp_image; ?>" width="200"><br><br>
<?php
$arr_crp_info = getimagesize($crp_image);
echo $arr_crp_info[3];
?>