transparency in gaussian_dropshadow()

GD and GD2 are useful libraries for creating graphics on-the-fly. Discuss your PHP GD and GD2 scripts here.

Moderators: onion2k, General Moderators

Post Reply
punknroll
Forum Newbie
Posts: 2
Joined: Tue Mar 28, 2006 4:17 am

transparency in gaussian_dropshadow()

Post by punknroll »

hi i try to modify the gaussian_dropshadow function of the soft drop shadow example (http://www.phpgd.com/scripts.php?script=26). I want to have the background transparent. without the function is is not problem with

Code: Select all

imagecolortransparent($source, $white);
. I don't know where to place this funtion inside the gaussian_dropshadow function.

anyone ever tried this?
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

I've tried it. It's tricky because the gaussian function averages the background colour of the image and changes it .. so you lose the transparency colour. At some point I'll make it do proper alpha, but for the time being I'm afraid you're stuck with a solid background.
punknroll
Forum Newbie
Posts: 2
Joined: Tue Mar 28, 2006 4:17 am

i will try imagemagick instead

Post by punknroll »

hi again, thanx for your quick reply. now i will try to use imagemagick, because i really need a transparent background
Post Reply