Download the PHP package christianberkman/imagick-text-box without Composer
On this page you can find all versions of the php package christianberkman/imagick-text-box. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download christianberkman/imagick-text-box
More information about christianberkman/imagick-text-box
Files in christianberkman/imagick-text-box
Download christianberkman/imagick-text-box
More information about christianberkman/imagick-text-box
Files in christianberkman/imagick-text-box
Vendor christianberkman
Package imagick-text-box
Short Description Add a simple text box to an image using PHP's Imagick Library
License MIT
Package imagick-text-box
Short Description Add a simple text box to an image using PHP's Imagick Library
License MIT
Please rate this library. Is it a good library?
Informations about the package imagick-text-box
imagick-text-box
Add a simple text box to an image using PHP's Imagick Library

Installation
Composer:
composer install christianberkman/imagick-text-box
Usage
Also see example.php with a more detailed example of usage.
Public methods
void __construct(Imagick $image)Construct the class and initialize ImagickDraw objectsvoid draw(int $gravity = Imagick::GRAVITY_SOUTHEST)draw the textbox on theImagick $imageobjectbool textFits()Returns if the text fits on the given image
Public Properties
Imagick Objects
All these objects are fully accessible and can be manipulated to set desired fill color, font size, etc.
Imagick $imageYour image objectImagickDraw $textText object, initialized by ImagickTextBoxImagickDraw $boxBox object, initializes by ImagickTextBox
Configuration
string $string = 'Hello World'The string of text to printint $margin_x = 10Margin (px) from the side (does not apply to north, south, center)int $margin_y = 10Margin (px) from the top/bottom (does not apply to west, east, center)int $padding = 5Padding (px) of text inside text boxint $gravity = Imagick::GRAVITY_SOUTHWESTImagick Gravity Constantfloat $heightFactor = 0.6Height factor to use. By using the default font, a factor of 1 produces a text box with a lot of vertical whitespace, 0.6 seems to do the trick.
All versions of imagick-text-box with dependencies
PHP Build Version
Package Version
Requires
ext-imagick Version
*
The package christianberkman/imagick-text-box contains the following files
Loading the files please wait ...