Skip to content

Instantly share code, notes, and snippets.

Created September 9, 2013 13:30
  • Star 8 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
How to add a text caption to an image with MiniMagick and Ruby
require 'rubygems'
require 'mini_magick'
img = MiniMagick::Image.from_file("jpeg.jpg")
img.combine_options do |c|
c.gravity 'Southwest'
c.draw 'text 10,10 "whatever"'
c.font '-*-helvetica-*-r-*-*-18-*-*-*-*-*-*-2'
Copy link

ragar90 commented Jul 18, 2022

what does the font means?? and how do I change font size??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment