Skip to content

Instantly share code, notes, and snippets.

@klebervirgilio
Created October 29, 2010 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klebervirgilio/653421 to your computer and use it in GitHub Desktop.
Save klebervirgilio/653421 to your computer and use it in GitHub Desktop.
the error occurs whenever I try to use the class method 'Image.read'
def img(opt={})
opt[:background_path] ||= "#{Rails.root.to_s}/public/images/citywaypass/card_background.png"
opt[:background_density] ||= "300x300"
opt[:font] ||= 'arial'
opt[:font_weight] ||= 900
opt[:pointsize] ||= 24
opt[:width] ||= 2603
opt[:heigth] ||= 1620
opt[:text] ||= "Something...."
background = Image.read(opt[:background_path])
background.first.density = opt[:background_density]
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment