Всем привет.
Возможно ли реализовать эффекты
imagemagick в Ps?
Пример:
Код: #!/bin/bash
#
SRC="/home/iron/Desktop/1" # Путь к исходным файлам
#
ROOT="/home/iron/Desktop" # root/base дира, куда "складывать" файлы
#
EXT=".jpg" #
EXT2=".png" # Или .JPG, или .png (тип файлов источника/приемника)
# That's all you *have* to set up
# IMAGEMAGICK VARIABLES
TILEW=4 # Number of images across
TILEH=6 # Number of images down
GEOMETRYW=200 # Width of image tiles
PADX=2 # Padding in the x direction
PADY=5 # Padding in the y direction
LABEL=`basename "%f"` # Print filenames under tiles
BGCOLOR=white
RENUMBER=0
FONT="-mdk-helvetica-medium-r-normal--13-130-75-75-p-71-tcvn-5712"
TARGET=`date +%Y_%m_%d`
WIDTH=800
CONTACT=true
RESIZE=false
ZIP=false
INCREMENT=1
POLAROID=true
ANGLE=-1
THUMBNAIL=200
BORDERCOLOR=snow
BACKGROUND=black
PRE=1
USAGE="$0 [-c] [-n name] [-r] [-t target] [-w width] [-z]"
TITLE=MET-ART
while getopts cn:rt:w:z OPTION ;
do
case "$OPTION" in
c) CONTACT="true" ;;
n) NAME="$OPTARG" ;;
r) RESIZE="true" ;;
t) TARGET="$OPTARG" ;;
w) WIDTH="$OPTARG" ;;
?) echo $USAGE; exit 1 ;;
esac
done
clear
while [ -d "$ROOT/$TARGET" ] ;
do
INCREMENT=$(($INCREMENT+1))
TARGET=`echo $TARGET | awk -F'-' '{print $1}'`-$INCREMENT
echo "Target exists, using $TARGET"
done
mkdir $ROOT/$TARGET
BIGPATH="$ROOT/$TARGET"
echo "Copying images . . ."
cp $SRC/*$EXT $BIGPATH &&
echo "Finished copying images."
chmod -x $BIGPATH/*$EXT # For some reason my pix have the executable
# bit set
if [ $POLAROID == true ] ; then
mkdir $BIGPATH/$PRE
mkdir $BIGPATH/$ANGLE
cp $BIGPATH/*$EXT $BIGPATH/$ANGLE
for image2 in `ls $BIGPATH/$ANGLE`
do
NUMCOUNT=`printf "%03d" $NUMBER`
mv $BIGPATH/$ANGLE/$image2 "$BIGPATH/$PRE/$NUMCOUNT$EXT2"
NUMBER=$(($NUMBER+1))
done
echo "changing effects . . ."
mogrify -geometry $WIDTH $BIGPATH/$PRE/*$EXT2
rm $BIGPATH/*$EXT
for image3 in `ls -1 $BIGPATH/$PRE/*$EXT2`
do
convert -thumbnail $THUMBNAIL -bordercolor $BORDERCOLOR -background $BACKGROUND -polaroid $ANGLE $image3 $image3
mv $image3 $BIGPATH/
done
rm -rf $BIGPATH/$PRE
rm -rf $BIGPATH/$ANGLE
fi
if [ $CONTACT == true ] ; then
totalimages=`ls -1 $BIGPATH | wc -l`
maximages=$(($TILEW*$TILEH))
c=1
e=$maximages
count=1
if [ $totalimages -le $maximages ] ;
then
echo "Generating contact sheet . . ."
montage -background $BGCOLOR -tile $TILEW\x$TILEH -geometry +$PADX+$PADY $BIGPATH/*$EXT2 $BIGPATH/index$EXT2
else
for i in `find $BIGPATH -type f -iname *$EXT2`
do
echo $i >> $BIGPATH/dirlist.$$
done
sort $BIGPATH/dirlist.$$ > $BIGPATH/dirlist2.$$
mv $BIGPATH/dirlist2.$$ $BIGPATH/dirlist.$$
while [ $c -le $totalimages ] ; do
numcount=`printf "%02d" $count`
sed -n $c,$e\p $BIGPATH/dirlist.$$ > $BIGPATH/index-$numcount
count=$(($count+1))
c=$(($e+1))
e=$(($e+$maximages))
done
rm $BIGPATH/dirlist.$$
of=`ls $BIGPATH/index-* | wc -l`
for l in $BIGPATH/index-*
do
inumber=`basename $l | sed s/index-//`
echo "Creating index for $l . . ."
montage -background $BGCOLOR -tile $TILEW\x$TILEH -geometry +$PADX+$PADY -label $LABEL `cat $l` $l$EXT
wait
rm $l
done
fi
fi
echo "Done!"
exit