PHP code example of suin / php-image-resizer
1. Go to this page and download the library: Download suin/php-image-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/ */
suin / php-image-resizer example snippets
use \Suin\ImageResizer\ImageResizer;
$resizer = new ImageResizer('/path/to/your/image.jpeg');
if ( $resizer->maxWidth(480)->maxHeight(640)->resize() === false ) {
// error
} else {
// success
}
json
{
": ">=5.3.0",
"suin/php-image-resizer": ">=1.0.0"
}
}