-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60d50e4
commit 900481f
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
/** | ||
* Jcrop image cropping plugin for jQuery | ||
* Example cropping script | ||
* @copyright 2008-2009 Kelly Hallman | ||
* More info: http://deepliquid.com/content/Jcrop_Implementation_Theory.html | ||
*/ | ||
|
||
|
||
$targ_w = $targ_h = 150; | ||
$jpeg_quality = 90; | ||
|
||
$src = $_GET['src']; | ||
$img_r = imagecreatefromjpeg($src); | ||
$dst_r = ImageCreateTrueColor( $targ_w, $targ_h ); | ||
|
||
imagecopyresampled($dst_r,$img_r,0,0,$_GET['x'],$_GET['y'], | ||
$targ_w,$targ_h,$_GET['w'],$_GET['h']); | ||
|
||
header('Content-type: image/jpeg'); | ||
imagejpeg($dst_r,null,$jpeg_quality); | ||
|
||
exit; | ||
|
||
|
||
?> |