Tag: 水印

水印图像用回形针,导轨4

我一直在尝试为我的图像添加水印,按照水印中使用回形针列出的答案: Watermark.rb: module Paperclip class Watermark < Processor # Handles watermarking of images that are uploaded. attr_accessor :current_geometry, :target_geometry, :format, :whiny, :convert_options, :watermark_path, :watermark_offset, :overlay, :position def initialize file, options = {}, attachment = nil super geometry = options[:geometry] @file = file @crop = geometry[-1,1] == '#' @target_geometry = Geometry.parse geometry @current_geometry = Geometry.from_file @file […]