PHP code example of aeroidea / aeroidea.resizer

1. Go to this page and download the library: Download aeroidea/aeroidea.resizer 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/ */

    

aeroidea / aeroidea.resizer example snippets

    
$arImgResize = \Aero\Resizer\Resizer::getInstance()
    ->setResizer(\Aero\Resizer\ImagickResizer::class)
    ->setInput('/img.jpg')
    ->setOutput('/img_100_50.jpg')
    ->setWidth(100)
    ->setHeight(50)
    ->setQuality(90)
    ->setForce(true)
    ->setResizeType(\Aero\Resizer\Resizer::RESIZE_PROPORTIONAL)
    ->run()
    ->getResult();