Sha256: 04566f704d37866ebcfac6d300253537e854f2399a3763400508f2aa2ba8a940

Contents?: true

Size: 446 Bytes

Versions: 2

Compression:

Stored size: 446 Bytes

Contents

module Jekyll
  module ImageResizer
    class WaterMark < Resizer
      def process_image(image_name, image_path)
        watermark = options['watermark'] || 'assets/images/watermark_karmelalla.png'
        image = MiniMagick::Image.open(image_path)

        image.combine_options do |c|
          c.gravity 'SouthEast'
          c.draw "image Over 0,0 0,0 '#{watermark}'"
        end

        image.write(image_path)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jekyll-image-resizer-0.7.1 lib/jekyll-image-resizer/water_mark.rb
jekyll-image-resizer-0.7.0 lib/jekyll-image-resizer/water_mark.rb