file_column and image watermarks

I did it by doing this

after_save :watermark_on_image

private
    def watermark_image
    #original photo
        dst = Magick::Image.read(self.image).first
        src =
Magick::Image.read("#{RAILS_ROOT}/public/images/watermark.jpg").first
        result = dst.composite(src, Magick::SouthEastGravity,
Magick::OverCompositeOp)
        result.write(self.image)
    #medium
        medium =
"#{RAILS_ROOT}/public/photo/image/#{self.id}/medium/#{File.basename(self.image)}"
        dst = Magick::Image.read(medium).first
        src =
Magick::Image.read("#{RAILS_ROOT}/public/images/watermadrk.jpg").first
        result = dst.composite(src, Magick::SouthEastGravity,
Magick::OverCompositeOp)
        result.write(medium)
       
    end