【发布时间】:2013-12-13 11:10:32
【问题描述】:
我正在尝试通过carrierwave 和mini_magic 在图像上添加文字。代码运行没有错误,但生成的图像上没有文字。
version :text do
process :put_text_stamp
end
def put_text_stamp
manipulate! do |img|
img.combine_options do |c|
c.gravity 'Center'
c.fill 'red'
c.pointsize '22'
c.draw "text 0,0 'TEXT'"
end
img = yield(img) if block_given?
img
end
end
【问题讨论】:
-
您找到答案了吗?有同样的问题
标签: ruby-on-rails-4 carrierwave minimagick