Hi!
Here's a piece of code:
[begin]
<?php
Header('Content-type: image/png');
$sz = "";
$FileValue = 1000;
$i = strlen($FileVal ue);
for ( $j = 0; $j < 7-$i; $j++ )
{
$sz = $sz . "0";
}
$Img = imagecreate(56, 13);
$Gold = imagecoloralloc ate($Img,148,12 8,100);
$Gray = imagecoloralloc ate($Img,32,32, 32);
ImageFilledRect angle($Img,0,0, 55,12,$Gray);
imagestring($Im g,4,0,0,$sz.$Fi leValue,$Gold);
imagepng($Img);
ImageDestroy($I mg);
?>
[end]
OK. Calling this script I have a png picture back.
Now I add imagecolortrans parent($Img,$Gr ay); just before imagepng() and OK
again, I have a transparent picture back. But now, if I add:
$r = imagerotate($Im g,90,0);
imagepng($r);
just after the imagecolortrans parent() 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.
Here's a piece of code:
[begin]
<?php
Header('Content-type: image/png');
$sz = "";
$FileValue = 1000;
$i = strlen($FileVal ue);
for ( $j = 0; $j < 7-$i; $j++ )
{
$sz = $sz . "0";
}
$Img = imagecreate(56, 13);
$Gold = imagecoloralloc ate($Img,148,12 8,100);
$Gray = imagecoloralloc ate($Img,32,32, 32);
ImageFilledRect angle($Img,0,0, 55,12,$Gray);
imagestring($Im g,4,0,0,$sz.$Fi leValue,$Gold);
imagepng($Img);
ImageDestroy($I mg);
?>
[end]
OK. Calling this script I have a png picture back.
Now I add imagecolortrans parent($Img,$Gr ay); just before imagepng() and OK
again, I have a transparent picture back. But now, if I add:
$r = imagerotate($Im g,90,0);
imagepng($r);
just after the imagecolortrans parent() 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.
Comment