5

I have tried the following code in imagemagick:

convert input.jpg -morphology Erode Square output.jpg 

I need to convert it into RMagick so that I can use in rails application

Taylan Aydinli
  • 4,333
  • 15
  • 39
  • 33
Sanjay Sharma
  • 232
  • 1
  • 9
  • 1
    We checked in http://studio.imagemagick.org/RMagick/doc/optequiv.html but it doesn't have -morphology in it. – sushil10018 Feb 05 '15 at 10:37
  • 1
    There seems to be an open PullRequest about this : https://github.com/rmagick/rmagick/pull/40 maybe a comment there to show interests would be enough to make things move :) – krtek Mar 05 '15 at 23:30

1 Answers1

1

You can always write it using the << operator:

MiniMagick::Tool::Convert.new do |convert|
  convert << 'input.jpg'
  convert << '-morphology' << 'Erode' << 'Square'
  convert << 'output.jpg'
end
Rafael Jung
  • 51
  • 2
  • 2