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! Link to comment https://forums.phpfreaks.com/topic/62375-help-using-gdphp/ Share on other sites More sharing options...
xxhopeful Posted July 30, 2007 Author Share Posted July 30, 2007 Bump Link to comment https://forums.phpfreaks.com/topic/62375-help-using-gdphp/#findComment-311154 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.