|
| Hi,
I have some truble resizing a transparent gif image.
After a while inside php.net trying diferent sollutions, I managed to
resize a gif and make this
transparent. But here I substituted white with transparent.
I need to resize a transparent gif. Any tryout on this results in
black instead of transparent.
Her is the code I used to resize and substitute the white with
transparent.
$dest = ImageCreateTrueColor(200,300);
imagetruecolortopalette($dest, false, 256);
@imagecopyresized ($dest, $src, 0, 0, 0, 0, 200, 300, 500,600);
$white = imagecolorresolve($this->img["des"], 255, 255, 255);
$transparent = imagecolortransparent($this->img["des"], $white);
echo "transp = $transparent<br>";
imagegif($dest,"test.gif");
Since the tryout with the transparent image resulted in black i tried
to substitute in
this line: $white = imagecolorresolve($this->img["des"], 0,0, 0);
But still black!
what do I miss?
regards, Sindre
|
|