Re: Display only a part of jpg without cropping the actual file
Posted: 2008-06-05T08:58:38-07:00
You would have to save this ( untested code ) as a file on its own and call from the page with <img src="code.php">
As to doing it without IM, I assume you could do it with Javascript
Code: Select all
<?php
$cmd = "convert image.jpg -gravity Center -crop 100x100+0+0 JPG:-";
header("Content-type: image/jpeg");
passthru($cmd, $retval);
?>