I want to crop an image. Is it possible to do like this. And if yes, how would the crop()
function look like?
$imgURL
is always a .jpg
image.
$image = file_get_contents($imgURL);
$maxWidth = 100;
$height = 68;
$image = crop($image, $maxWidth, $height);
file_put_contents("media/imgname.jpg", $image);
function crop($image, $maxWidth, $height){
...how do I crop the image?
}