GMgKe586q6suSQnyqZLlGCooeWM

Pages

Search

Friday, March 11, 2011

PHP - Loading PNG Image

<?php
header('Content-type: image/png');

$img = imagecreatefrompng('lamp.png');
imagecolorallocate($img, 200, 200, 200);

imagealphablending($img, true); // setting alpha blending on
imagesavealpha($img, true); // save alphablending setting (important)


imagepng($img);
imagedestroy($img);


Share/Bookmark

No comments:

Post a Comment