Remix919 Posted June 7, 2011 Share Posted June 7, 2011 Hi there, I'm trying to make a watermark using a JPG background file and a JPG logo file. Now, I want certain colors of the logo to be transparent, namely shades of green. Anyone know how to do this? Here is my code I am using: $green = imagecolorallocate($jpgimage, 0, 255, 1); imagecolortransparent($jpgimage, $green); imagecopymerge($img, $jpgimage, 100, 200, 0, 0, 640, 480, 100); And that code works fine, but it only makes the $green RGB transparent, how can I make more than just that one RGB transparent? I would ideally want to make all shades of green to appear transparent. Quote Link to comment https://forums.phpfreaks.com/topic/238696-how-to-set-multiple-transparent-colors-using-imagecolorallocate/ Share on other sites More sharing options...
Remix919 Posted June 7, 2011 Author Share Posted June 7, 2011 bump~ Quote Link to comment https://forums.phpfreaks.com/topic/238696-how-to-set-multiple-transparent-colors-using-imagecolorallocate/#findComment-1226758 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.