Saturday, 15 March 2014

Which is fast? Using minimagick gem in ruby or using direct system call convert (ImageMagick) in linux -



Which is fast? Using minimagick gem in ruby or using direct system call convert (ImageMagick) in linux -

i using freescale board low processing capacity. need resize images of various sizes 800x480 pixels. had used imagemagick resize through direct scheme call. scheme taking lot of time convert big images. thought of using minimagick since ruby installed in scheme other purposes. need advice on performance of using minimagick( know rmagic slow).

summary:

1) bash$ convert image1.jpg -resize 800x480 image2.jpg

2) ruby miniconvert.rb

where miniconvert.rb

require 'mini_magick' image = minimagick::image.open("image1.jpg") image.resize "800x480" image.write("image2.jpg")

which run faster on single core low cpu machine minimal linux installed? also, minimagick straight using scheme phone call (ie, calling convert of imagemagick)?

it doensn't matter much, because minimagick uses command line tool of imagemagick well, according its readme (it uses mogrify instead of convert).

so… gem more convenient, command line bit faster (no overhead).

ruby-on-rails ruby linux imagemagick minimagick

No comments:

Post a Comment