Following is the command
convert abc.jpg -scale 50x50! -depth 8 -fuzz 20% -transparent white sparse-color:- | convert -size 50x50 xc: -sparse-color voronoi '@-' +dither -colors 5 -depth 8 -format %G\%c histogram:info:
With a gem like
image_processing, I believe you would just make two calls to do this. The first would want to save the output to the file so that the second could operate on its output. That way you won't have to use pipes in Ruby.
Join 31,152+ developers who get early access to new screencasts, articles, guides, updates, and more.