Firstly, install the ImageMagick port using portmanager :
portmanager graphics/ImageMagick -l
Then proceed the below steps to watermark the image :
- Create a .png image file with the wordings for water marking. Spend some time think about the wordings color & image background, how it blends into the original image. In this case, name the image "watermark.png".
- For backup purpose, duplicate original pictures/images.
- Execute the following to watermark the picture :
composite -dissolve 80 -gravity southeast watermark.png image-before.png image-after.png
where :
-dissolve ==> shade brightness of watermark. If the original image is darker, use 80% or above.
-gravity ==> location of the watermark to be paste onto the picture. E.g. north, south, east, west, northwest, southeast, blah blah blah. - Repeat the previous step to get suitable angel & shades of watermark.
- To water mark a batch of images, create a bash script out of the following :
#!/usr/local/bin/bash # this is iterate all the images prefix with name "images" and ends with .png # in the current directory and put it into the directory of "watermarked" mkdir watermarked; for image in $(ls images*.png); do echo "Watermarking $image ..."; composite -dissolve 80 -gravity southeast watermark.png $image watermarked/$image; done
Farvel !!!
No comments:
Post a Comment