首页
开发手册
应用中心
工具
用户中心
FoundPHP Photo: Crop
English
中文简体
English
上一篇
下一篇
#FoundPHP Photo: Crop `the default integrated FoundPHP_image support format under the framework:jpg、jpeg、png、gif` `application library address:class/image/resize.php` `The default memory_limit of GD library php is 128M, if you need to process large-size photos, modify it above 512M.` **When using zoom zoom, you can use xy positioning, the default middle positioning** | Left side| Central | Right | | ------------ | ------------ | ------------ | | |
top(top)
| | | left(left) |
center(Centered)
| right(right) | | |
bottom(botton)
| |
**Legend:** ![](data/files/edit/20/05/03/200503_00152031.jpg) ###Crop Centered Photos ```php $FoundPHP_image->image('foundphp.jpg'); //standard zoom $FoundPHP_image->resize(array( 'width' =>400, 'height' =>400, 'cut' =>1, //1 cut the picture, 0 don't cut the picture 'zoom' =>1, //scaling )); $FoundPHP_image->save('foundphp_new'); ``` Achieve effect: ![](data/files/edit/20/05/05/200505_15466562.jpg) ###Crop Bottom Photos ```php $FoundPHP_image->image('foundphp.jpg'); //standard zoom $FoundPHP_image->resize(array( 'width' =>400, 'height' =>400, 'cut' =>1, //1 cut the picture, 0 don't cut the picture 'zoom' =>1, //Scaling 'xy' =>'bottom' //bottom )); $FoundPHP_image->save('foundphp_new'); ``` Achieve effect: ![](data/files/edit/20/05/05/200505_15488831.jpg)