Imagettftext 类似 C 函数
我需要实现类似于 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的。我解决了这个问题。 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.