We use some website software to share files with people. The website software is able to generate a preview of a Photoshop PSD file and it works well with them.
I found a watermarking script on this message board and when i use it on some PSD files the generated files do now process in our website software. Other PSD files work fine with the below script.
Script:
Code: Select all
# get dimensions of incoming file and save as a variable
dim=`convert "$1"[0] -format "%wx%h" info:`
#echo $dim
#echo $1 #incoming file
#echo $2 #outgoing file
convert \( "$1"[0] -background white -flatten \) \
\( -clone 0 -fill "gray(10%)" -colorize 50 \) \
\( /home/user/scripts/watermark.png -alpha extract -auto-level \
-write mpr:tile +delete -size $dim tile:mpr:tile \) \
-alpha off -compose over -composite \
"$2"
Code: Select all
./watermark.sh "/home/user/scripts/test03.psd" "/data/Test/test03.psd"
https://www.dropbox.com/s/01cxa7b1dntca ... K.zip?dl=0
Does anyone see a problem with my script or a problem with the original PSD that ImageMagick may have problems with?
Thanks!