PHP 8.5.0 Alpha 1 available for testing

Voting

: min(one, four)?
(Example: nine)

The Note You're Voting On

matrebatre
17 years ago
I had the same problem as Jeff, but his solution didn't work for me. I made this script, and it seems to work:

<?php

$img
= imagecreatefromgif('in.gif');
$w = imagesx($img);
$h = imagesy($img);

$trans = imagecolortransparent($img);
if(
$trans >= 0) {

$rgb = imagecolorsforindex($img, $trans);

$oldimg = $img;
$img = imagecreatetruecolor($w,$h);
$color = imagecolorallocate($img,$rgb['red'],$rgb['green'],$rgb['blue']);
imagefilledrectangle($img,0,0,$w,$h,$color);
imagecopy($img,$oldimg,0,0,0,0,$w,$h);

}

imagegif($img,'out.gif');

?>

<< Back to user notes page

To Top