Created
June 12, 2012 05:18
-
-
Save meetme2meat/2915286 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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