1. Go to this page and download the library: Download muravian/php-image-resize 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/ */
muravian / php-image-resize example snippets
use Muravian\PhpImageResize\ImageResize;
$image = new ImageResize();
$image->setPath('../path/to/your/file');
echo $image->render();
use Muravian\PhpImageResize\ImageResize;
$image = new ImageResize();
$image->setPath('../path/to/your/file');
$image->setWidth(500);
echo $image->render();
use Muravian\PhpImageResize\ImageResize;
$image = new ImageResize();
$image->setPath('../path/to/your/file');
$image->setHeight(500);
echo $image->render();
use Muravian\PhpImageResize\ImageResize;
$image = new ImageResize();
$image->setPath('../path/to/your/file');
$image->setWidth(500);
$image->setHeight(500);
echo $image->render();
bash
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.