Generate simple placeholder images with a specific size, color, and some text on them. For PHP 8.1 and newer.
MIT License
makePlaceholderImage
function (hence the bump to v3)Full Changelog: https://github.com/nicoverbruggen/image-generator/compare/v2.2.0...v3.0.0
Published by nicoverbruggen 3 months ago
makePlaceholderImage()
now correctly calls generate()
, although this deprecated function will be removed in v3)ob_clean()
Full Changelog: https://github.com/nicoverbruggen/image-generator/compare/v2.1.0...v2.2.0
Published by nicoverbruggen almost 3 years ago
The package has been updated for the upcoming release of PHP 8.1!
This is a simple maintenance release so that there are no more warnings about the following:
str_replace
is deprecatedPublished by nicoverbruggen over 3 years ago
The package has been updated for PHP 8!
With named parameter support, now you can do this:
(new ImageGenerator(
targetSize: "150x150",
fontPath: "/System/Library/Fonts/Supplemental/Arial.ttf",
fontSize: 20
))->generate(text: "Hello world");
ImageGenerator
has changed, so you will want to adopt named parameters.makePlaceholderImage
still exists (because it was still in v2.0.0), but it is deprecated in favor of generate
.