PHP code example of armd-pro / image
1. Go to this page and download the library: Download armd-pro/image 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/ */
armd-pro / image example snippets
if($normalize = !$cropMode) {
$cropMode = Image::RESIZE_MODE_NORMALIZE;
}
$image = new ImageFromFile($imagePath);
if(!$w) {
$image->resizeByHeight($h, $normalize);
} else if(!$h) {
$image->resizeByWidth($w, $normalize);
} else {
$image->resize($w, $h, $cropMode);
}
$image->output();