Skip to content

Instantly share code, notes, and snippets.

@meetme2meat
Created June 12, 2012 05:18
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 meetme2meat/2915286 to your computer and use it in GitHub Desktop.
Save meetme2meat/2915286 to your computer and use it in GitHub Desktop.
require "rubygems"
require 'RMagick'
include Magick
## Image that you want to resize
img = ImageList.new(File.join(Rails.root,'public',self.logo_image.to_s))
## Resize Parameter
img.resize!(self.logo_width.to_i, self.logo_height.to_i)
## Resize to filed name you want to use
img.write(File.join(Rails.root,'public',self.logo_image.to_s))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment