PHP code example of kitsunecode / cropper

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

    

kitsunecode / cropper example snippets



 new \KitsuneCode\Cropper\Cropper("patch/to/cache");

echo "<img src='{$c->make("images/image.jpg", 500)}' alt='Image' title='Image'>";
echo "<img src='{$c->make("images/image.jpg", 500, 300)}' alt='Image' title='Image'>";


 new \KitsuneCode\Cropper\Cropper("patch/to/cache");

//flush by filename
$c->flush("images/image.jpg");

//flush cache folder
$c->flush();