I am looking for gems that will allow me to resize and watermark uploaded images.
I see a lot of posts on ImageScience and Mini-Magick but nothing that recent. I am looking for any experiences that will help me make a decision.
I am looking for gems that will allow me to resize and watermark uploaded images.
I see a lot of posts on ImageScience and Mini-Magick but nothing that recent. I am looking for any experiences that will help me make a decision.
I'd recommend using Paperclip to upload the images.
With Paperclip you define how you want the images to be processed after uploading.
Auto resizing is accomplished by setting values in your upload Model
class User < ActiveRecord::Base
has_attached_file :avatar, :styles => { :medium => "300x300>", :thumb => "100x100>" }
end
Here is a good example of creating a Post Processors and another for adding a watermark with ImageMagick.
Of note is that you already have an application (with uploaded images) live, you can "re-run" the Paperclip commands over it again with the command:
rake paperclip:refresh ModelName RAILS_ENV=production
I'm currently using RMagick on a couple of products and it is working fine for me. However, people constantly complain about its memory usage. The documentation can be a little confusing though.
A new project that I have heard good things about is MagickWand for Ruby. But I don't have any experience with that.