PHP code example of sledgehammer / graphics
1. Go to this page and download the library: Download sledgehammer/graphics 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/ */
sledgehammer / graphics example snippets
$image = new Image('/path/to/my-image.jpg');
$resized = $image->resized(120, 100);
$resized->saveAs('/path/to/my-image-as-120x100.png');