Skip to content

Instantly share code, notes, and snippets.

@bartolsthoorn
Created January 31, 2011 09:55
Show Gist options
  • Save bartolsthoorn/803838 to your computer and use it in GitHub Desktop.
Save bartolsthoorn/803838 to your computer and use it in GitHub Desktop.
def resize(size)
ImageScience.with_image(@imagefilename) do |img|
img.thumbnail(size) do |resizedimg|
@tempimage = resizedimg
@width = resizedimg.width
@height = resizedimg.height
return true
end
end
end
def save(location)
@tempimage.save location
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment