installation
> gem list mini_magick Successfully installed subexec-0.1.0 Successfully installed mini_magick-3.3
Usage
In short, check readme.For example for POSIX:
require 'mini_magick'
image = MiniMagick::Image.open("http://www.google.com/images/logos/logo.png")
image.resize "50%"
image.format :gif
image.write "localcopy.gif"
(Since the end of 2011, we can write the same codes both for POSIX and for Windows. Please check this article.)
require 'mini_magick'
MiniMagick.timeout = 42
image = MiniMagick::Image.open("http://www.google.com/images/logos/logo.png")
image.resize "50%"
image.format :gif
image.write "localcopy.gif"
Because of the bug both in mini_magick and in subexec, the developer using Ruby 1.9.x on Windows should write the mantra MiniMagick.timeout = milliseconds
No comments:
Post a Comment