Imagettftext 类似 C 函数

发布于 2024-09-08 00:21:02 字数 156 浏览 0 评论 0原文

我需要实现类似于 PHP 的 imagettftext 函数的功能。我需要输入文本并根据该文本输出 bmp 图像。我已经看过 freetype,但它逐字符转换,不适合将整个文本转换为图像。我现在被困住了。我如何访问 imagettftext 函数的源代码或者是否有另一个库 inc 可以做到这一点?

I need to implement a functionality similar to PHP's imagettftext function. I need to enter a text and output a bmp image based on that. I already looked at freetype but it converts character by character and is not suitable to convert the whole text to an image. I am stuck at the moment. How can I access the source code of imagettftext function or is there another library inc to do that?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

泪之魂 2024-09-15 00:21:02

好的。我解决了这个问题。 GD 库中有一个函数可以执行(但需要 FreeType),然后您可以将图像保存为 PNG 格式。

OK. I solved the question. In GD library there is a function to do (but requires FreeType) that and then you can save the image in PNG format.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文