PHP code example of antey / image-slice
1. Go to this page and download the library: Download antey/image-slice 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/ */
antey / image-slice example snippets
use Antey\ImageSlice\HorizontalImageSlice;
$imageSlice = new HorizontalImageSlice(100, 100);
$slices = $imageSlice->slice(__DIR__ . '/example.jpeg');
use Antey\ImageSlice\VerticalImageSlice;
$imageSlice = new VerticalImageSlice(100, 100);
$slices = $imageSlice->slice(__DIR__ . '/example.jpeg');
$imageSlice->allowUpscale();
$imageSlice->allowLastSlide();