PHP code example of stoffel / console-image

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

    

stoffel / console-image example snippets


use Stoffel\Console\Image\ImageHelper;

ImageHelper::create($output)
    ->print('/path/to/image.jpg');

// or with explicit maximal dimensions (still scaled in correct aspect ration)
ImageHelper::create($output)
    ->print('/path/to/image.jpg', 40, 20);