lfphp / limg
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/lfphp/limg
Requires
- intervention/image: ^2.7
- lfphp/func: ^2.0
README
The current library is based on PHP CURL extension and tested in PHP7.3 or above environment. In view of ethical standards, please do not use this library to illegally obtain network resources without permission.
Install
- PHP version is greater than or equal to 7.3
- Extensions must be installed: gd
Please use Composer to install:
composer require lfphp/limg
Usage
1. CURL method to obtain content
<?php $img = __DIR__.'/a.jpg'; $new_img = __DIR__.'/b.png'; Limg::fromImg($img) ->fixOrientate() ->getInfo($origin_info) ->resize(800, 400, 'cover') ->changeFormat('png') ->addRepeatTextWatermark('hell world') ->getInfo($target_info) ->saveAs($new_img);