File: example/example.php

Recommend this page to a friend!
  Classes of Alexandre Sinício  >  PHP Image Overlay Text  >  example/example.php  >  Download  
File: example/example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Image Overlay Text
Render multiple texts over an image
Author: By
Last change:
Date: 4 years ago
Size: 490 bytes
 

 

Contents

Class file image Download
<?php
require '../imageOverlayer.php';

use
alesinicio\imageOverlayer;

//SETS THE CONFIGURATION FILE.
//SEE THE FILE FOR MORE INFORMATION.
$configurationFile = "overlay_config.php";

try {
   
$imgOutput = imageOverlayer::overlay($configurationFile); //CREATES AN IMAGE WITH THE OVERLAY.
   
$base64 = imageOverlayer::imgToBase64($imgOutput); //BASE64 ENCODING SO WE AVOID SAVING FILES TO DISK.
   
echo "<img src='$base64'>";
} catch (
Exception $e) {
    echo
$e->getMessage();
}


For more information send a message to info at phpclasses dot org.