PHP code example of kennynguyeenx / image-service

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

    

kennynguyeenx / image-service example snippets


use Kennynguyeenx\ImageService\ImageService;

try {
    $imageService = new ImageService();
    $imageService->manipulateImage($imageUrl, $options, $outputImagePath, $outputFormat);
} catch (Exception $exception) {
    exit($exception->getMessage());
}

$ php ./bin/manipulate_image.php ./images/source/example_image.png 200x200_ ./images/destination/updated_image.png gif