?? cut_image.php
字號:
<?php
if(!isset($_POST['x']) || !isset($_POST['y'])){
die();
}
$x = $_POST['x'];
$y = $_POST['y'];
$temp_img = imagecreatefromjpeg('test.jpg');
$new_img = imagecreatetruecolor(100,100);
$old_width = imagesx($temp_img);
$old_height = imagesy($temp_img);
imagecopyresampled($new_img,$temp_img,0,0,$x,$y,100,100,100,100);
imagejpeg($new_img , 'temp.jpg');
imagedestroy($new_img);
echo date("Y-m-d H:i:s") . '<br /><a href="temp.jpg" target="_blank">see the image.</a>';
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -