dindigital / din-image by mariosmello

A package to manage images
536
2
4
Package Data
Maintainer Username: mariosmello
Maintainer Contact: mario@dindigital.com (Mario Mello)
Package Create Date: 2016-05-02
Package Last Update: 2018-05-23
Language: PHP
License: MIT
Last Refreshed: 2024-11-11 15:13:37
Package Statistics
Total Downloads: 536
Monthly Downloads: 2
Daily Downloads: 1
Total Stars: 2
Total Watchers: 4
Total Forks: 1
Total Open Issues: 1

DIN Image

Instalação usando Composer

"require": {
    "dindigital/din-image": "dev-master"
}

Utilizando no Laravel

Editar o arquivo config\app.php:

Service Providers

Din\DinImage\DinImageServiceProvider::class

Alias

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

Publicar e editar config config/din-image.php

php artisan vendor:publish

Utilizando

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

Utilizando Fora do Laravel

//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();