1

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 http://uppix.net/d/a/f/dc82fce795fc4af20170080b09c9a.png ==> alt text http://uppix.net/8/9/9/b1e9df4b2858c40081771961e028d.png

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 ?

Kami
  • 5,791
  • 8
  • 37
  • 50

2 Answers2

4

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
  • 3,182
  • 1
  • 16
  • 35
2

Try the edge detection chapter in the ImageMagick examples.

Pekka
  • 431,103
  • 135
  • 960
  • 1,075