Permalink
Browse files

added image-magick

  • Loading branch information...
1 parent f944d94 commit d772729fd9fd0d577db37ed3bddb3617c51cc191 @stanislaw stanislaw committed Jun 26, 2012
Showing with 55 additions and 9 deletions.
  1. +25 −9 README.md
  2. +19 −0 image-magick/image-magick
  3. +10 −0 image-magick/runner
  4. +1 −0 runner
View
@@ -11,25 +11,41 @@ The repo is a setup phase. Only two scripts for ruby-vips and rmagick are availa
## Benchmarks for 2012.06.26
<pre>
-stanislaw@localhost ~/work/gems/vips-benchmarks $ ./runner images/huge.jpg output/huge.jpg
+stanislaw@localhost ~/work/gems/vips-benchmarks $ ./runner images/huge.jpg
+output/huge.jpg
==== Ruby platform ====
-Ruby-vips 0.1.1
+Ruby-vips 0.1.1 built against vips-7.26.7-Tue May 22 02:54:27 EEST 2012
-real 0m1.806s
-user 0m3.284s
-sys 0m0.075s
+real 0m1.777s
+user 0m3.259s
+sys 0m0.099s
-This is RMagick 2.13.1 ($Date: 2009/12/20 02:33:33 $) Copyright (C) 2009 by Timothy P. Hunter
+This is RMagick 2.13.1 ($Date: 2009/12/20 02:33:33 $) Copyright (C) 2009 by
+Timothy P. Hunter
Built with ImageMagick 6.7.7-5 2012-06-24 Q16 http://www.imagemagick.org
Built for ruby 1.9.3
Web page: http://rmagick.rubyforge.org
Email: rmagick@rubyforge.org
-real 0m2.882s
-user 0m3.486s
-sys 0m0.147s
+real 0m2.849s
+user 0m3.516s
+sys 0m0.171s
+
+
+==== ImageMagick ====
+
+Version: ImageMagick 6.7.7-5 2012-06-24 Q16 http://www.imagemagick.org
+Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
+Features: OpenMP
+
++ convert 'images/huge.jpg[2360x1720+100+100]' -resize 90x90% -convolve '-1,
+-1, -1, -1, 16, -1, -1, -1, -1' output/huge.jpg
+
+real 0m2.288s
+user 0m5.393s
+sys 0m0.256s
</pre>
## Performance test design
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# we crop on load, it's a bit quicker and saves some memory
+# we can't crop 100 pixels with the crop-on-load syntax, so we have to
+# find the width and height ourselves
+
+width=`header -f Xsize $1`
+height=`header -f Ysize $1`
+
+width=$((width - 200))
+height=$((height - 200))
+
+ set -x
+
+ convert "$1[${width}x${height}+100+100]" \
+ -resize 90x90% \
+ -convolve "-1, -1, -1, -1, 16, -1, -1, -1, -1" \
+ $2
+
View
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+echo
+
+echo "==== ImageMagick ===="
+
+echo
+
+convert --version
+time image-magick/image-magick $1 $2
View
@@ -1,3 +1,4 @@
#!/bin/bash
ruby/runner $1 $2
+image-magick/runner $1 $2

0 comments on commit d772729

Please sign in to comment.