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

BlackHoleSecurity/simpleimage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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