xxhopeful Posted July 29, 2007 Share Posted July 29, 2007 I am currently working on creating a script that will allow people to pick a certain hex code, and an image will appear that is the color they selected. I believe you need to use some GD for this, I may be wrong but thats why I'm here! Heres an example of my script: $base = @imagecreate(397, 500); $background_color = imagecolorallocate($base, 250, 255, 255); $body = imagecreatefromgif('images/base.gif'); imagecolortransparent($body); imagecopymerge ($base, $body, '0', '0', '0', '0', '397', '500', '100'); imagedestroy($body); $part1 = imagecreatefromgif('images/partone.gif'); imagecolortransparent($part1); imagecopymerge ($base, $part1, '0', '0', '0', '0', '397', '500', '100'); imagedestroy($part1); imagegif($base,'images/test.gif'); imagedestroy($base); This all works fine, I just don't know how to code it so the $body image would be able to turn black or gray and then the $part1 image could turn green or purple (just examples). Any suggestions? I tried looking through tutorials but nothing helped. Thanks! Quote Link to comment Share on other sites More sharing options...
xxhopeful Posted July 30, 2007 Author Share Posted July 30, 2007 Bump Quote Link to comment 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.