title: Positioning a caption over a background using Rmagick or ImageMagick
body: <p>I have a background image that I want to add a text box to. </p>
  
  <p>I am trying to figure out how to position a caption in the right spot on top of it. (I'm using caption because I need the word wrap feature).</p>
  
  <p>Right now, I'm only able to get the text to show on the <em>top left corner</em>, but I need to be able to manually position where it starts.  </p>
  
  <pre><code>require 'RMagick'
  require 'Pry'
  include Magick
  
  text = "Lorem ipsum dolor sit amet"
  
  img =  ImageList.new('template001.jpg')
  img &lt;&lt;  Magick::Image.read("caption:#{text}") {
    self.fill = '#FFFFFF'
    self.font = "Helvetica"
    self.pointsize = 32
    self.size = "550x400"
    self.background_color = "none"
  }.first
  
  a = img.flatten_images
  
  a.write("out.jpg")
  </code></pre>