Skip to main content
100%

Paperclip watermarking processor

✓ Published0🌍 Public
XXXX
Last edited Jun 28, 2011
Created on Jun 28, 2011

This example shows a Paperclip processor that watermarks uploaded images using ImageMagick command-line tools. It composes a watermark image onto the source file with configurable gravity positioning and offset, or falls back to plain conversion if no watermark path is provided. The code uses the `composite` and `convert` commands via the Cocaine gem, applying resize and crop transformations through Paperclip’s Geometry parsing. It handles format conversion and preserves the original basename while writing the result to a temporary file.

AI-generated description

Similar vizzes