Search code examples
ruby-on-railsrubyruby-on-rails-3rmagick

Rendering dynamic image mock-ups in Ruby on Rails


I am trying to create an app that allows a user to create a text treatment (either by uploading a graphic or in a WYSIWYG editor), and upload it -- the app would then render the uploaded text treatment and show that, overlaid on the side of a building (for a mockup of what it would look like if it were on a billboard, building, or what-not)

I am developing the app in Ruby on Rails, and I know some image-processing libraries like RMagick, allows you to manipulate uploaded imagery in special ways, but I wanted to see if anybody had any other advice on the best way to implement this.

Sorry for the vagueness, and thank you for your time!


Solution

  • I do this for one of my clients. RMagick is a fine choice. I personally prefer GraphicsMagick, which is not quite as popular yet is better written (IMHO).

    Consider using alpha channel transparency, which makes overlays especially easy. For example, use PNGs with transparent channels.