Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Latest commit

 

History

History
39 lines (34 loc) · 1.13 KB

README.md

File metadata and controls

39 lines (34 loc) · 1.13 KB

SimpleImage

Very cool fortune teller generator result images CodeFactor License

Installation

composer require bhsec/simpleimage:dev-master

Setup

Edit and config your api key at .env file

Example

<?php

require __DIR__ . '/vendor/autoload.php';
use Cvar1984\Fortune;

// configuration
$query = 'Dark'; // background query
$waterMark = 'Generated by simpleimage';
$paragraf = isset($argv[1]) ? $argv[1] : Fortune\Fortune::make(Fortune\Fortune::TERRY_DAVIS); // will use random fortune if argument is empty
$optionQuote = [
    'text' => $paragraf,
    'watermark' => $waterMark,
    'query' => $query,
    'font' => 'Shadow Brush.ttf',
    'result' => [
        'output' => 'quote.jpg',
        'mime' => 'image/jpeg',
        'quality' => 100, // 100%
    ],
];


$result = \Bhsec\SimpleImage\Templates\QuoteTemplates::make($optionQuote); // generate images
var_dump($result);