lfphp / limg
There is no license information available for the latest version (0.0.7) of this package.
0.0.7
2025-02-15 03:37 UTC
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);