2

When a user uploads an image in my rails app imagemagick handles two transformations:

 has_attached_file :photo, :styles => { :listsize => "50x50#", :articlesize => "300x300" },

a listsize (square 50x50px) image is produced. Is it possible to at this point merge this image with a standard transparent png that would make the image look more like an icon? (I have the png image, I just want to know if it's possible to render another photo style that has this default transparent png placed over the :listsize image). Thanks

colbern
  • 21
  • 2

1 Answers1

1

Imagemagick is an entire image processing library and thus anything is possible. Paperclip also supports post processing.

Check the Rmagick documentation http://rmagick.rubyforge.org/

And also the Paperclip documentation on post processing https://github.com/thoughtbot/paperclip

I personally would also advise you to look into carrierwave also https://github.com/jnicklas/carrierwave

Alex Barlow
  • 148
  • 1
  • 7