Transparent image
From: AMcD (arnold.mcdonald_at_free.fr)
Date: 11/28/03
- Next message: Savut: "Re: no document_root?"
- Previous message: Savut: "Re: Sessions across browser instances?"
- Next in thread: Michael Fuhr: "Re: Transparent image"
- Reply: Michael Fuhr: "Re: Transparent image"
- Reply: R. Rajesh Jeba Anbiah: "Re: Transparent image"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 28 Nov 2003 18:39:49 +0100
Hi!
Here's a piece of code:
[begin]
<?php
Header('Content-type: image/png');
$sz = "";
$FileValue = 1000;
$i = strlen($FileValue);
for ( $j = 0; $j < 7-$i; $j++ )
{
$sz = $sz . "0";
}
$Img = imagecreate(56,13);
$Gold = imagecolorallocate($Img,148,128,100);
$Gray = imagecolorallocate($Img,32,32,32);
ImageFilledRectangle($Img,0,0,55,12,$Gray);
imagestring($Img,4,0,0,$sz.$FileValue,$Gold);
imagepng($Img);
ImageDestroy($Img);
?>
[end]
OK. Calling this script I have a png picture back.
Now I add imagecolortransparent($Img,$Gray); just before imagepng() and OK
again, I have a transparent picture back. But now, if I add:
$r = imagerotate($Img,90,0);
imagepng($r);
just after the imagecolortransparent() instruction seen above, I get a
rotated picture, but not transparent. How to solve that? I've used a plenty
of tricks, no one works.
Thanx.
- Next message: Savut: "Re: no document_root?"
- Previous message: Savut: "Re: Sessions across browser instances?"
- Next in thread: Michael Fuhr: "Re: Transparent image"
- Reply: Michael Fuhr: "Re: Transparent image"
- Reply: R. Rajesh Jeba Anbiah: "Re: Transparent image"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|