Here is an image that I put a shadow on. I made it on a transparent background so it can be placed (flattened) over any background image. But you can change the background color or the other parameters.
shadowval="gray(85)" <--- brightness of shadow (larger values are brighter)
shadowblur=20 <--- blur distance around outside of shadow
shadowx=50 <--- width of shadow from bottom left corner of image
shadowy=25 <--- height of shadow from bottom left corner of image
bgcolor="none" <--- background color
shadowval="gray(70)"
shadowblur=10
shadowx=50
shadowy=25
bgcolor="none"
shadowblur2=`convert xc: -format "%[fx:1.414*$shadowblur]" info:`
convert \( zelda3.png -flip +distort SRT '0,0 1,-1 0' \) \
\( +clone -background $shadowval -shadow 60x${shadowblur}+0+0 \
-virtual-pixel Transparent +distort Affine "0,0 0,0 100,0 100,0 0,100 $shadowx,$shadowy" \) \
+swap -background "$bgcolor" -layers merge \
-fuzz 2% -trim +repage -gravity east -chop ${shadowblur2}x0 zelda3_shadow.png
Affine "0,0 0,0 100,0 100,0 0,100 $shadowx,$shadowy"
Due to the tricks in line 1, the coordinates in the Affine are measure from the bottom. The first 0,0 0,0 means to leave the bottom left unchanged. Similarly, 100,0 100,0 means leave the bottom right unchanged. The 0,100 $shadowx,$shadowy means shift the top right and left corners (since it is affine) by the amounts specified where x is to the left. The 100 means percentage of width or height and thus similarly for the shadowx,shadowy. So 50,25 means the x or width of the shadow (shown) will be 50% and the y or height of the shadow (shown) will be 25% of the image.
Here is a smaller shadow:
shadowval="gray(95)"
shadowblur=10
shadowx=10
shadowy=10
bgcolor="none"
shadowblur2=`convert xc: -format "%[fx:1.414*$shadowblur]" info:`
convert \( zelda3.png -flip +distort SRT '0,0 1,-1 0' \) \
\( +clone -background $shadowval -shadow 60x${shadowblur}+0+0 \
-virtual-pixel Transparent +distort Affine "0,0 0,0 100,0 100,0 0,100 $shadowx,$shadowy" \) \
+swap -background "$bgcolor" -layers merge \
-fuzz 2% -trim +repage -gravity east -chop ${shadowblur2}x0 zelda3_shadow2.png
