PHP code example of acoustep / canvas

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

    

acoustep / canvas example snippets


$canvas = \Acoustep\Canvas()->width(500)
							->height(250)
							->background('#000000')
							->image('images/test.jpg', array('x' => 'left',
											                 'y' => 'top',
											                 'scale' => 'best'));

$canvas = \Acoustep\Canvas()->width(500)
							->height(250)
							->background('#000000')
							->image('images/test.jpg', array('x' => 'left',
											                 'y' => 'top',
											                 'scale' => 'best'))
							->filetype('png')
							->output('output')
							->create();

header("Content-Type: image/png");
$canvas = \Acoustep\Canvas()->width(500)
							->height(250)
							->background('#000000')
							->image('images/test.jpg', array('x' => 'center',
											                 'y' => 'middle',
											                 'scale' => 'width'))
							->filetype('png')
							->output(NULL)
							->create();