Grimoire-
Command
.es

GNU+Linux command memo

Multi-page watermarking via convert

Si quelqu’un veut faire du watermarking avec des documents multipages :

$ convert \
-density "$DENSITY" "$INPUT" \
-write mpr:base \
\( \
    -density "$DENSITY" \
    -background none \
    -fill "#ff000030" \
    -gravity center label:"$TEXT" \
    -trim \
    -rotate -10 \
    -write mpr:tile \
    +delete \
\) \( \
    -clone 0--1 \
    -tile mpr:tile \
    -draw 'color 0,0 reset' \
    -write mpr:wm \
    -delete 0--1 \
\) \
-delete 0--1 \
mpr:wm null: mpr:base \
-compose overlay \
-layers composite "$OUTPUT"

From this @aeris original content : https://mamot.fr/@aeris@firefish.imirhil.fr/111426717282466669