|
Posted by Chamomile on 05/22/06 19:02
>
> It's mentioned in the user comments in php.net manual page:
> http://fi.php.net/manual/en/function.imagecreatetruecolor.php#54025
>
> // Creates a transparent image rather than the default black image
> function imageCreateTransparent($x, $y) {
> $imageOut = imagecreate($x, $y);
> $colourBlack = imagecolorallocate($imageOut, 0, 0, 0);
> imagecolortransparent($imageOut, $colourBlack);
> return $imageOut;
> }
>
> HTH
>
> --
> "ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" -lpk
> spam@outolempi.net | Gedoon-S @ IRCnet | rot13(xvzzb@bhgbyrzcv.arg)
>
>
Yes, thanks - I came accross that.
The problem is, it only makes a non-truecolor image which is no good for my
purposes
as I am downsampling with imagecopyresample() in order to get 'aliased'
curve fills at small sizes.
- downsampling an image made using imagecreate() gives jagged curves,
whereas downsampling using imagecreatetruecolor() gives good smoothing.
Unfotunately it seems once an image has ever been truecolor - even if you
theoretically set it back to paletted colors
(as far as I can see with experimentation) you cannot re-set the
transparency of the 'black' areas.
It seems to be a choice between smoothed curves or transparency - not both!
Navigation:
[Reply to this message]
|