PHP code example of dindigital / din-image

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

    

dindigital / din-image example snippets


Din\DinImage\DinImageServiceProvider::class

'DinImage' => \Din\DinImage\Facades\DinImage::class

use DinImage;

return $image = DinImage::setWidth(100)
	->setHeight(100)
	->setCommand('fit')
	->setName('Mário')
	->setImage('panda.jpg')
	->render();

//Definindo o padrão
$this->dinImage = new DinImage([
    'default_image' => __DIR__ . '/../resources/source/default.png',
    'source_folder' => __DIR__ . '/../resources/source/',
    'dest_folder' => __DIR__ . '/../resources/dest/',
]);

return $this->dinImage->setWidth(30)
	->setHeight(20)
	->setCommand('fit')
	->setName('Nome da Imagem')
	->setImage('nome-da-imagem.jpg')
	->render();
config\app.php
config/din-image.php

php artisan vendor:publish