0.0
No commit activity in last 3 years
No release in over 3 years
Simple ImageMagick Wrapper.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.5
>= 0
>= 0
>= 0
>= 0
 Project Readme

SimpleMagick

GemVersion Code Climate Test Coverage Build Status Inline docs

SimpleMagick is Ultra Simple ImageMagick Wrapper.

Installation(Dependency)

requirements ImageMagick(use mogrify command)

% brew install imagemagick

Installation

Add this line to your application's Gemfile:

gem 'simple_magick'

And then execute:

$ bundle

Supported versions

  • Ruby 2.0.0 or later

Usage

require 'simple_magick'

if SimpleMagick.imagemagick_installed?
  image = SimpleMagick::Image.new('/path/to/src_image.jpg')
  image.resize '150x150'
  image.convert! '/path/to/dest_image.jpg'
end

using another option?

  image = SimpleMagick::Image.new('/path/to/src_image.jpg')
  image.additional_option 'type', 'Grayscale' # mogrify -type Grayscale /path/to/src_image.jpg

Benchmark

Benchmark Spec

  • OSX 10.8.5
  • CPU: 2.53 GHz Intel Core i5
  • Memory: 8GB

Version

  • ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin12.0]
  • mini_magick (3.7.0)
  • simple_magick (0.0.2)
  • ImageMagick 6.8.7-7

How To Benchmark

Setup.

% cd benchmark
% brew install imagemagick
% bundle install

exec.

% bundle exec ruby benchmark.rb
                      user     system      total        real
simple_magick     0.080000   0.270000  28.530000 ( 29.687068)
mini_magick       0.410000   0.790000  31.300000 ( 37.115507)
ImageMagick       0.030000   0.170000  28.620000 ( 29.094316)

Contributing

  1. Fork it ( http://github.com//simple_magick/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request