andrewgjohnson/imagettftextblur

imagettftextblur is a drop-in replacement for imagettftext with added parameters to add blur, glow and shadow effects to your PHP GD images

Maintainers

Package info

github.com/andrewgjohnson/imagettftextblur

Homepage

pkg:composer/andrewgjohnson/imagettftextblur

Fund package maintenance!

andrewgjohnson

Patreon

Statistics

Installs: 208 246

Dependents: 1

Suggesters: 0

Stars: 27

Open Issues: 0

v1.3.1 2026-04-30 00:58 UTC

README

MIT License Current Release Contributors Packagist Downloads Issues Patreon

Description

imagettftextblur is a drop-in replacement for imagettftext with added parameters to add blur, glow and shadow effects to your PHP GD images.

Patreon - Become a Patron

imagettftextblur is an agjgd project.

Usage

With Composer

This project offers support for the Composer dependency manager. You can find the imagettftextblur package online on packagist.libfun.net.

Install using Composer

Either run this command:

composer require andrewgjohnson/imagettftextblur

or add this to the require section of your composer.json file:

"andrewgjohnson/imagettftextblur": "1.*"

Without Composer

To use without Composer add an include to the imagettftextblur.php source file.

include 'source/imagettftextblur.php';

Examples

// In PHP 8.0 a ninth parameter ($options) was added to imagettftext()
imagettftext($im, 20, 0, 0, 0, $color, $font, $string, array()); // Add text to a GD image
imagettftextblur($im, 20, 0, 0, 0, $color, $font, $string, array()); // This works the same as the line above
imagettftextblur($im, 20, 0, 0, 0, $color, $font, $string, array(), 1); // This will add the same text only blurred

// We also support previous versions of PHP back to 5.0 and the previous version of imagettftext()
imagettftext($im, 20, 0, 0, 0, $color, $font, $string); // Add text to a GD image
imagettftextblur($im, 20, 0, 0, 0, $color, $font, $string); // This works the same as the line above
imagettftextblur($im, 20, 0, 0, 0, $color, $font, $string, 1); // This will add the same text only blurred

There are other examples included in the GitHub repository and on imagettftextblur.agjgd.org.

Help Requests

Please post any questions in the discussions area on GitHub if you need help.

If you discover a bug please enter an issue on GitHub. When submitting an issue please use our issue template.

Contributing

Please read our contributing guidelines if you want to contribute.

You can contribute financially by becoming a patron at patreon.com/agjopensource to support imagettftextblur and other agjgd.org projects.

Patreon - Become a Patron

Acknowledgements

This project was started by Andrew G. Johnson (@andrewgjohnson).

Full list of contributors:

Our security policies and procedures comes via the atomist/samples project. Our issue templates comes via the tensorflow/tensorflow project. Our pull request template comes via the stevemao/github-issue-templates project. The mountains photo comes via Gabriel Garcia Marengo.

Changelog

You can find all notable changes in the changelog.