views:

40

answers:

2

Hi, I would like to script PHP/ImageMagic in order to produce the "shadow" of a given image. Like in this example (done manually in GFXeditor) :

      original                shadow

alt text ==> alt text

Note: All the originals images will be on a white background like in the example.

I've check the ImageMagic documentation but I haven't found anything useful yet. Does anyone know if it can be done in PHP/ImageMagic ? If so how ?

+1  A: 

Try the edge detection chapter in the ImageMagick examples.

Pekka
+2  A: 

Use convert with -threshold option?

EDIT: oops... from PHP? Imagick::thresholdImage?

I wonder if it isn't more like a mask than a shadow? In the context of IM, shadow looks like a blurry copy of the image.

pascal