|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Confirmed User
Industry Role:
Join Date: May 2012
Location: With your mom
Posts: 5,189
|
I would like to watermark thousands of images. I am trying to do it with imagemagick.
Code:
composite -dissolve 40% -gravity SouthWest /path/to/watermark.png /path/to/input/file.jpg /path/to/output/file.jpg The sh script is... Code:
#!/bin/bash
WM=$HOME/path/to/watermark.png
STARTDIR="/dicecotry/of/pics"
for imagedir in $( find $STARTDIR -type d )
do
echo "Running in $imagedir ..."
cd $imagedir
file -i * | grep image | awk -F':' '{ print $1 }' | while read IMAGE
do
echo "Watermarking $IMAGE"
composite -dissolve 40% -gravity SouthWest -quality 100 $WM "$IMAGE" "$IMAGE"
done
done
|
|
|
|
|
|
#2 |
|
Confirmed User
Industry Role:
Join Date: May 2012
Location: With your mom
Posts: 5,189
|
Solved by writing a new script... Thanks, nobody, anyway!
|
|
|
|
|
|||||||
|
|||||||
| Bookmarks |
| Tags |
| watermark, images, folder, composite, write, script, based, recursion, command, crap, add, folders, managed, ideas, imagemagick, dissolve, thousands, recursively, imagick, 40%, gravity, individual, files, batch, southwest |