| Welcome to WebmasterWorld Guest from 184.108.40.206 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor 2014|
|problems with GD image transparency|
imagecolorallocatealpha wont change all white pixels to alpha
Basically what I want to do is change all the white pixels in a png image to transparent. Found this code somewhere, which seems to make most of the white pixels transparent, but not all.
$png = imagecreatefrompng("top.png");
$trans_colour = imagecolorallocatealpha($png, 255, 255, 255, 127);
imagefill($png, 0, 0, $trans_colour);
How do I do this?
$im = imagecreatefrompng("top.png");
$bg_color = imagecolorat($im,1,40);
Worked fine. Thanks
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved