PHP code example of wernerdweight / microbe-image-manager
1. Go to this page and download the library: Download wernerdweight/microbe-image-manager 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/ */
wernerdweight / microbe-image-manager example snippets
/// get manager
$im = $this->kernel->service('imageManager');
/// upload your image file(s), create database records etc.
...
/// process image (one by one)
/// 1st parameter ($file) is instance of WernerDweight\MicrobeImageManager\File\UploadedFile (mandatory)
/// 2nd parameter is the filename of newly created file (mandatory)
/// 3rd parameter is a path under upload_path from config (optional)
$processedImageInfo = $im->processImage($file,'destination-filename','/optional/subpath');