PHP code example of newerton / image-workshop

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

    

newerton / image-workshop example snippets


    $interlace = true; // set true to enable interlace, false by default
    $layer->save($dirPath, $filename, $createFolders, $backgroundColor, $imageQuality, $interlace);

$layer->resizeInPixel(null, 0 /* or negative number */, null);

    // before
    $layer = new ImageWorkshop(array(
        'imageFromPath' => '/path/to/images/picture.jpg',
    ));

    // now
    $layer = ImageWorkshop::initFromPath('/path/to/images/picture.jpg');