Media watermark

Inside my bootloader:

version :profile do
    process :resize_to_fill => [300, 300]
    process :quality => 90
    process :watermark



  def watermark
    manipulate! do |img|
      logo ="#{Rails.root}/assets/images/watermarks/watermark.png").first
      img = img.composite(logo, Magick::SouthEastGravity, Magick::OverCompositeOp)


  • above will not work while imagemagick is installed.
  • no errors, so very difficult to debug

  • Is there a way to debug and fix the above code to create a working watermark for the carrier?


source to share

1 answer

Where is the line where you write the result to disk?

I believe the method composite

itself does not write the result to disk. You have to call img.write('composite.gif')

(or whatever filename you want) to actually save the composite result.

I suppose this is possible for the carrier, but can you verify this by checking the output file content and / or timestamps to see if the file has been modified after upload?

Link: - about half way down the page



All Articles