0

I tried, with imagemagick, to simulate an upper light spot adding drop shadows to every sides of a png picture using the following code:

#!/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

I got the wanted drop shadows but there is a break on the upper right and bottom left side of the picture and I am not able to get rid of them.

Example

emcconville
  • 23,800
  • 4
  • 50
  • 66
  • What version are you using? Your script works fine in IM 6.9.2-3 without any visible breaks in the NorthEast & SouthWest corners. – emcconville Oct 30 '15 at 11:23
  • 6.8.6-10. It's more an uniformity problem and here's and example: http://image.noelshack.com/fichiers/2015/44/1446059038-win-2015-10-28-200340-shadow.png – Winkelried Nov 01 '15 at 12:05

0 Answers0