imagemagick を使用して、次のコードを使用して、png 画像のすべての側面にドロップ シャドウを追加する上部のライト スポットをシミュレートしようとしました。
#!/usr/bin/env sh
imageshadow()
{
out=${1%.*}-shadow.${1#*.}
in=$1
if [ ! -z $2 ]; then
convert $in -frame $2 $out
in=$out
fi
convert $in -bordercolor "#eee8d5" -border 4 \
\( -clone 0 -background black -shadow 40x3+3+3 \) \
\( -clone 0 -background black -shadow 40x3-3-3 \) \
-reverse -background none -layers merge +repage $out
}
imageshadow $1
必要なドロップ シャドウを取得しましたが、画像の右上と左下に切れ目があり、それらを取り除くことができません。