Is there a PHP function which can accept the image path of a PNG-24 as a parameter and then return a PNG-8 version on web browsers?
For example, the HTML code of the original PNG-24 is:
<img src="image/path/lorem.png">
And then this will return a PNG-8 version on web browsers:
<img src="convert-png24-to-pnp8.php?image/path/lorem.png">
The PNG-24 images I want to convert don’t have semi-transparent pixels but has completely transparent pixels.
Building on SERPRO’s answer above, using ImageMagick you could do something like:
That’s untested, but should give you something to go on. The formats ImageMagick can export as are listed here: http://www.imagemagick.org/script/formats.php