0

I am using ImageMagick (via Dragonfly in Ruby) and need to convert an image that looks like this:

X

To tile like this:

XXX XXX XXX

and have a set width (200 px in my case).

How would I accomplish this?

Kara
  • 6,115
  • 16
  • 50
  • 57
Rick
  • 8,366
  • 8
  • 47
  • 76

1 Answers1

1

With ImageMagick, you would load the source image with the tile: format.

convert -size 200x200 tile:x.png out.png

For Dragonfly, you would need to extent the Dragonfly.app.generate

image = Dragonfly.app.generate(:convert, '-size 200x200 tile:x.png', 'png') 
emcconville
  • 23,800
  • 4
  • 50
  • 66
  • How would I handle the DragonFly approach if I am trying to modify an existing image? – Rick Oct 28 '14 at 18:24