Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2015-11-28 (11 months ago)  | | Not enough user ratings | | Total: 212 | | All time: 7,731 This week: 916 |
|
Description | | Author |
This class can render text headlines on the top of images.
It can take a given image and renders a text inside a given rectangle of the image.
The resulting image is saved to another given file.
The font, text color, transparency level are some of the configurable parameters. | |
 |
|
Innovation award
 Nominee: 6x |
|
Details
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();
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.