PHP code example of ahtesham / blueprint-image-php

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

    

ahtesham / blueprint-image-php example snippets


use Ahtesham\BlueprintImage\BlueprintImage;

$blueprint = [
    'width' => 600,
    'layout' => [
        'type' => 'div',
        'props' => [
            'style' => [
                'backgroundColor' => '#1e293b',
                'padding' => 40,
                'borderRadius' => 20
            ],
            'children' => 'Hello from Blueprint Image!'
        ]
    ]
];

BlueprintImage::make($blueprint)->save('hello_world.png');

BlueprintImage::make()->loadJson($jsonString)->save('report.png');
bash
composer