i am looking for a way to add a drop shadow to an image using php. before you answer or vote to close: i am not looking to do this using css or html. i want to generate an image file. this is not a duplicate of this question nor this one.
i am looking for a very specific effect. for example, given this input image:
i want to produce the following image:
tl;dr: this image above was generated using photoshop's drop shadow effect. i want a look very similar to that. for reference, here's the settings our design team used. ideally, i'd have similar control in my code for angle, distance, opacity, etc:
i have full access to our debian-linus-based servers, so any gd or imagemagick solution will work. as will any foss linux software solution, although i'd prefer a way to do it with im or gd as those are already installed and don't require new software to be installed.
the shadow must be able to be placed on a transparent, non-rectangular png!
i'm asking the question mainly because the scripts and solutions i have found on the web either only produce rectangular shadows, look like total poo, or just plain don't work at all.