-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text not rendered correctly as an image with the packaged libgd3
version
#2236
Comments
I confirm this bug. Software versions:
|
Actually, the patchset seems to be identical to the one from the official Ubuntu distribution. What changes are the dependencies. The Ubuntu package is not built with dependencies on libramq, libavif, libimagequant . |
My guess is that the bug is somewhere in the support for rendering RTL languages. But I would need a reproducer to see what should be disabled or fixed. Perhaps filling this against upstream libgd might also help? Someone might take a look, but reproducer would be really useful. |
@oerdnj yep, that would make sense to me as well. Although this issue libgd/libgd#887 seems to fit the bill quite well. |
@oerdnj in the issue mentioned above they seem to imply that the |
Nope, this was only fixed in the embedded version of libgd, but not in any official libgd release (the 2.4 is not yet out). |
Frequently asked questions
Describe the bug
I run an instance of Zabbix whose web interface runs on a local PHP 8.3 (FPM) installation sourced from the Ubuntu PPA.
After upgrading to Ubuntu 24.04.1 and PHP 8.3 we noticed a problem in the image rendering of graphs, which is accomplished by the web interface through the PHP GD extension.
A normal rendering would look something like this
What we would get instead is
Going through the code I tracked the problem to a imagettftext call at https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/ui/include/graphs.inc.php#476
The text rendered as an image appears to be squashed horizontally.
I then tried bringing the
libgd3
package for the GD library back from version2.3.3-12+ubuntu24.04.1+deb.sury.org+1
to the distro stock version2.3.3-9ubuntu5
and restarted thephp8.3-fpm
service.And the text rendering went back to normal.
Another thing is that installing the PPA version installed as depedencies the libraries below, which get uninstalled by switching back to the stock Ubuntu version of
libgd3
This is also likely the cause of the similar-looking https://support.zabbix.com/browse/ZBX-25191
To Reproduce
Hard to provide a simple way. Probably some simple PHP code using the
imagettftext
function would do the trick.Your understanding of what is happening
Something with the patches to the gd library code to compile this package is causing text rendered as an image to be squashed horizontally.
What steps did you take to resolve issue yourself before reporting it here
I looked through the stack of the image rendering until I arrived to the underlying GD library. Substituting it with a "stock" version solved the problem, hence the packaged version is likely the problem
Expected behavior
For text to be rendered legibly as an image through the PHP GD extension and the underlying GD library
Distribution (please complete the following information):
Package(s) (please complete the following information):
The listing above is after switching back to the stock Ubuntu package
Additional context
I am unsure whether the
arm64
architecture might have an impact on the issue.The text was updated successfully, but these errors were encountered: