For one of my scripts I need to check if gif
images are transparent (have transparency) using php. Note, I only need this for gif images.
My sincere apologies if this has been asked. I couldn't find anything that answers this question or works.
For one of my scripts I need to check if gif
images are transparent (have transparency) using php. Note, I only need this for gif images.
My sincere apologies if this has been asked. I couldn't find anything that answers this question or works.
Sorry, only possible with GD:
$image_original = imagecreatefromgif($image_file_path)
if (imagecolorsforindex($image_original, imagecolorstotal($image_original)-1)['alpha'] == 127) {
echo '<strong style="color:crimson">TRANSP. GIF</strong>';
}