I tried something like this but it just makes the background of the image white, not necessarily the alpha of the image. I wanted to just upload everything as jpg’s so if i could somehow “flatten” a png image with some transparently to default it to just be white so i can use it as a jpg instead. Appreciate any
Tag: gd
PHP gdLib 8-Bit PNG with alpha
how is it possible to save my image, created with gd, as an png-8? it saves as gif with transparent channel well – but I want to use png-8. Best Regards, Beerweasle Answer Using imagesavealpha() and a transparent bg color should do the trick… Based on dfilkovi’s code: