Page 1 of 1

Crop an Image around any shape

Posted: Wed Feb 18, 2009 3:54 am
by bubs81
Hi all,

Here's the scenario - I have a rectangular image with a shape placed in the centre of it. Between the shape and the border, is an opaque white (50% transparent) color. What I'm trying to do is crop the image around a shape using the php gd library. So i thought I could try replace the opaque white color outside of the shape with transparent, (feel free to suggest a better approach).

I'm beginning to tear my hair out now so any help would be much appreciated! Please help!

Thanks in advance :-)

bubs81