Jump to content

imagecreatefrompng looses transparency.


lynxus

Recommended Posts

Hi Guys,

 

I have a script that will display an image based on what the user selected in a DB.

 

so for instance.

 

a user will have <img src="http://blaa.com/image.php?siteid=1234">

 

Now my

image.php will

 

<?
// do lost of other error checking etc
// add their ip and time to a DB for visitor tracking.

// now show the user a image

$style = $_GET['siteid'];

   $image = imagecreatefrompng('http://status.imsupporting.com/'.$style.'off.png');

}
}

// and now... we display the image
imagepng($image);
imagedestroy($image);

?>

this doesn't preserve the transparency , Is there a better way to do all this?

 

-G

 

 

Link to comment
https://forums.phpfreaks.com/topic/184427-imagecreatefrompng-looses-transparency/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.