Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
I actually posted something similar back in April, but that post (and my old user) seem to be gone. Anyway...
Does anyway have a single command for adding a 3 sided drop shadow? I have an unbelievably ugly solution, but feel sure magick users with more skills than me could do better.
Feel free to laugh at my code, I'm sure it's overly engineered and the completely wrong way to go about things with imagemagick... I'm a java guy after all...
netnichols wrote:Does anyway have a single command for adding a 3 sided drop shadow? I have an unbelievably ugly solution, but feel sure magick users with more skills than me could do better.
What is a 3 sided drop shadow????
A simple final example image would have been good.
For a 3 side shadow, what I would do is just shadow it normally and offset the shadow straight downward, rather than diagonally left or right. If you can enlarge the shape being shadowed slightly, or merge two shadows, or even so some other post processing of the shadow, you can generate a stronger 3 sided effect (the outline shaodw example does the latter using a -channel restricted -evaluate ).
convert pic.png \( +clone -background black -shadow 75x5+0+0 -channel A -evaluate multiply 1 +channel \) +swap +repage -gravity center -geometry -0-4 -composite pic-shadow.png
And it's easy to tweak it further.
Thanks again.
As a side note, I couldn't get the example using "-layers merge" to work for me... it always complained of "convert: UnrecognizedLayerMethod `merge'." I'm using version 6.3.6 installed with MacPorts.
The -layers merge is one of the most recent additions. basically to allow flatten/mosaic operations on images with negative offset positions, which is likely to happen as Image distortion progresses to the point of doing panarama mosaics. It certainally makes shadowing easier as this can also generate negative offsets.
MacPorts may need to update to a newer version for its releases soon.
I really wish I can generate APT packaged versions for ubuntu, which I have been trialling. as it is I have to compile and install a personal IM version in my own home. -- Sory I am ranting