PHP code example of algo26-matthias / create-thumbnail
1. Go to this page and download the library: Download algo26-matthias/create-thumbnail 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/ */
algo26-matthias / create-thumbnail example snippets
use Algo26\CreateThumbnail\CreateThumbnail;
$thumbnail = new CreateThumbnail();
$thumbnail->setTargetWidth($width)
->setTargetHeight($height)
->setTargetType('JPEG')
->setJpegCompressionQuality(90)
->create($inputFile, $outputFile);