PHP code example of niklasbr / quick-magick

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

    

niklasbr / quick-magick example snippets


use Faker\Factory;
use NiklasBr\QuickMagick\QuickMagick;

$faker = Factory::create();
$faker->addProvider(new QuickMagick($faker));

// Simple image with only default parameters
$imageData = $faker->image();

// A linear gradient (using mixed colour notation)
$imageData = $faker->image(category: 'LINEAR_GRADIENT', word: '#1100ff-magenta');