Joining lots of small images into one large image

A

Azalar ---

I have 40 small images that are 70 x 70 pixels and they are numbered
like 1.jpg, 2.jpg etc up to 40.jpg

I want to merge these into 1 large image strip 2800 x 70 pixels in Ruby
code but am not sure of the best approach to this.

Can anyone point me in the right direction for this or better still a
snippet of code?

Thanks

Az
 
R

Rob Biedenharn

I have 40 small images that are 70 x 70 pixels and they are numbered
like 1.jpg, 2.jpg etc up to 40.jpg

I want to merge these into 1 large image strip 2800 x 70 pixels in
Ruby
code but am not sure of the best approach to this.

Can anyone point me in the right direction for this or better still a
snippet of code?

Thanks

Az
--

That's exactly what the 'montage' command from ImageMagick does. As
long as
using:
images = (1..40).map{|i| "#{i}.jpg"}
system("montage #{images.join(' ')} +page -tile 40x1 -geometry
70x70+0+0 #{outfile}")
counts as "Ruby code", then you're all set!

-Rob

Rob Biedenharn http://agileconsultingllc.com
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,054
Latest member
LucyCarper

Latest Threads

Top