How to combine images in Ruby

I have 4 square images, 1,2,3 and 4 each with 2048x2048px.

I need to combine those into a 4096x4096px image, like this:

 1 2
 3 4

Right now I am doing this manually with Gimp, but the amount processing is growing and I would like to implement an automated solution.

Is there an easy way to do this in Ruby? (Rails gem would be ok or any shell command that can be run from inside a Rails app)

Source: linux

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.