PHP code example of it-blaster / crop-bundle

1. Go to this page and download the library: Download it-blaster/crop-bundle 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/ */

    

it-blaster / crop-bundle example snippets


...
new Fenrizbes\CropBundle\FenrizbesCropBundle(),
...

...
    ->add('CroppableFirstImage', 'croppable', array(
        'width'  => 250,
        'height' => 250
    ))
...

...
    ->add('CroppableSecondImage', 'croppable', array(
        'label'             => 'Image crops',
        'width'             => 250,
        'height'            => 250,
        'validate'          => false,
        'max_canvas_width'  => 600,
        'max_canvas_height' => 600,
        'instances'         => array(
            array(
                'label'  => 'First crop',
                'width'  => 200,
                'height' => 250
            ),
            array(
                'label'  => 'Second crop',
                'width'  => 100,
                'height' => 100
            )
        )
    ))
...