Ruby库从文本生成图形?

时间:2023-02-05 22:50:35

I'm working in Rails and I'm looking for a library/gem/plugin to generate a graphic from text. Google Maps doesn't allow you to overlay text, only graphics so I'm looking for a back door to overlay text. Suggestions?

我在Rails工作,我正在寻找一个库/ gem /插件来生成文本图形。谷歌地图不允许您叠加文本,只允许图形,所以我正在寻找覆盖文本的后门。建议?

3 个解决方案

#1


Take a look at RMagick.

看看RMagick吧。

To draw text using RMagick, you need to use one the text or annotate methods.

要使用RMagick绘制文本,您需要使用text或annotate方法。

#2


You need something like RMagick, though that particular library has been known to leak memory.

你需要像RMagick这样的东西,尽管已知这个特定的库会泄漏内存。

#3


libgd can do this, and has bindings for many different languages, including Ruby

libgd可以做到这一点,并且具有许多不同语言的绑定,包括Ruby

#1


Take a look at RMagick.

看看RMagick吧。

To draw text using RMagick, you need to use one the text or annotate methods.

要使用RMagick绘制文本,您需要使用text或annotate方法。

#2


You need something like RMagick, though that particular library has been known to leak memory.

你需要像RMagick这样的东西,尽管已知这个特定的库会泄漏内存。

#3


libgd can do this, and has bindings for many different languages, including Ruby

libgd可以做到这一点,并且具有许多不同语言的绑定,包括Ruby