I am trying to do image manipulation as process to add some text to my app. The effect I'm looking for is : adding text to image, after saving. The problem I'm dealing here is I get error: uninitialized constant PhotoUploader::Draw.
process :poster
def poster
manipulate! do |source|
txt = Draw.new
txt.family
txt.pointsize = 12
txt.gravity = Magick::SouthGravity
txt.stroke = "#000000"
title = Demot.last.title
source = source.resize_to_fill(400, 400).border(10, 10, "black")
source.annotate(txt, 0, 0, 0, 40, title)
end
end
Change to
txt = Magick::Draw.new