Ask a Question
Advertise on boostr.in
Organizational Research By
Surprising Reserch Topic
crop image in php
crop image in php ¬†using -'php,gd,crop'
The code below crops the image well, which is what i want, but for larger images, it wotn work as well. Is there any way of 'zooming out of the image'
Idealy i would be able to have each image roughly the same size before cropping so that i would get good results each time
$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);
echo '<img src="'.$dest_image.'" ><p>';
Sep 9, 2015
to add a comment.
Related Hot Questions
Government Jobs Opening