Enhances capabilities of the script

Adds all image format support
Adds file names with spaces support
Adds automatic output folder creation if needed

TODO :
Create config file to change lots of configurations (watermark position, no resizing, ....)
Add automatic contrast calculation and watermark modification if needed
Check for ImageMagick presence before starting script
This commit is contained in:
Julien Lengrand-Lambert
2011-12-20 12:14:26 +01:00
parent 185fee7cd6
commit 80f95ecf3b
8 changed files with 5 additions and 4 deletions

0
README.markdown Normal file → Executable file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

0
in/feel_lonely__by_jlengrand-d4dp6sk.jpg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 3.2 MiB

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 355 KiB

0
out/pourquoi_le_bitume__by_jlengrand-d4dp4ha.jpg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 308 KiB

After

Width:  |  Height:  |  Size: 308 KiB

View File

@@ -10,8 +10,6 @@
##---
#TODO :
# must be available for jpg, jpeg, JPEG , . . . too !
# Adds output folder creation if needed
# Automatically check for background constrast and invert watermark color if needed
#identify -format "%w,%h"foto.jpg
@@ -23,8 +21,11 @@ OUT_REPO=$2
WATER=$3
echo " Input repo is : $IN_REPO"
# creating output folder
mkdir -pv $OUT_REPO
SAVEIFS=$IFS # used to take care of files with spacenames
IFS=$(echo -en "\n\b")
for file in $IN_REPO/*
do
HEIGHT=$(identify -format "%h" ${file})
@@ -65,5 +66,5 @@ do
composite -gravity $GRAV -geometry +10+10 $WATER $OUTNAME $OUTNAME
done
IFS=$SAVEIFS
exit 0