How to convert Imagemagick morphology of Erode Square to Rmagick?

I tried the following code in imagemagick:

convert input.jpg -morphology Erode Square output.jpg 

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

+5
source share
1 answer

You can always write it with the operator << :

 MiniMagick::Tool::Convert.new do |convert| convert << 'input.jpg' convert << '-morphology' << 'Erode' << 'Square' convert << 'output.jpg' end 
+1
source

Source: https://habr.com/ru/post/1212695/


All Articles