PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Luciano Salvino  >  Custom Headlines  >  README.md  >  Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Readme
Class: Custom Headlines
Render text headlines on the top of images
Author: By
Last change: update readme
update readme
Date: 6 years ago
Size: 1,035 bytes
 

Contents

Class file image Download

CustomHeadlines

CustomHeadlines is a PHP class that add headlines to images with text and background color depending on the image color index of selected area

Usage

// Define parameters

// Image Source

$image = 'images/example.jpg';
// Image result
$imageResult = 'images/example_result1.jpg';
// alpha of the box area
$alpha = 40;
// text of headline
$headline = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua';
// Fontsize
$fontSize = 18;
// Box area position and measures
$areaX = 10;
$areaY = 10;
$areaW = 560;
$areaH = 90;

// Initialize Class
$ch = new CustomHeadlines();

// set font size and family
$ch->getFontFile();
$ch->setFontSize(22);

// You can set the inverse color to set text with de inverse color respect of background (optionl)
$ch->colorInverse = true; // Default: false

// Create image
$ch->Create($image,$headline,$areaX,$areaY,$areaW,$areaH,$alpha,$imageResult);

// Get the image
$imgaeResult = $ch->getImage();
For more information send a message to info at phpclasses dot org.