in reply to Perl GD problem

Doesn't GD only support 256 colours, or has that changed? Check the docs.

Replies are listed 'Best First'.
Re^2: Perl GD problem
by chakkaln (Sexton) on Aug 17, 2005 at 14:28 UTC
    I thought we can use 256 colors any number of times which is the case. I am not aware of the limit of 256 colors as this is the first time I am using GD. Does this mean that we cannot use more than 256 times Thanks

      You may need to switch from a color palette to true color mode. See the GD docs.

      GD::Image->trueColor(1);

      -xdg

      Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

        Thanks for the advice. I have now made it to true color and am successful in getting all the lines in different color but has brought in another problem. The background has turned black. How can I correct it.