В приведенном ниже коде используется изображение, которое я хочу, но для больших изображений оно также работает. Есть ли способ "масштабирования изображения"
Idealy я мог бы иметь каждое изображение примерно того же размера до обрезки, чтобы каждый раз получать хорошие результаты
Код
<?php
$image = $_GET['src']; // the image to crop
$dest_image = 'images/cropped_whatever.jpg'; // make sure the directory is writeable
$img = imagecreatetruecolor('200','150');
$org_img = imagecreatefromjpeg($image);
$ims = getimagesize($image);
imagecopy($img,$org_img, 0, 0, 20, 20, 200, 150);
imagejpeg($img,$dest_image,90);
imagedestroy($img);
echo '<img src="'.$dest_image.'" ><p>';