working with shadows - repaging?
Posted: 2007-02-25T11:36:20-07:00
Currently I'm doing something like:
The result is a enlarged image that doesn't have shadow on the upper and left sides. Neither below the original image nor the frame. I wonder how I can repage the image before applying the MagickShadowImage function as suggested at the IM v6 example site?
If anyone has any other suggestion on how to apply a shadow that can run on all sides I'd be extremely grateful.
/tsr
Code: Select all
function addShadow($wand) {
$clone = CloneMagickWand($wand);
$shadowColor = NewPixelWand('black');
$backgroundColor = NewPixelWand('white');
MagickSetImageBackgroundColor($clone, $shadowColor);
MagickShadowImage($clone,50,3,0,0);
MagickAddImage($wand, $clone);
DestroyMagickWand($wand);
MagickSetImageBackgroundColor($clone,$backgroundColor);
$wand = MagickMosaicImages($clone);
}
addShadow($wand);
MagickBorderImage($wand, NewPixelWand('white']), 10, 10);
addShadow($wand);
If anyone has any other suggestion on how to apply a shadow that can run on all sides I'd be extremely grateful.
/tsr