PHP code example of lfphp / limg
1. Go to this page and download the library: Download lfphp/limg library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lfphp / limg example snippets
$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);