Need help with GD library

Discussion in 'PHP' started by picos, Nov 1, 2010.

  1. #1
    picos, Nov 1, 2010 IP
  2. Nythe

    Nythe Peon

    Messages:
    30
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If the GD library is working, then maybe there is something wrong in the code you wrote.
    Try the following code, replacing "someimg" with a real image path:

    <?PHP
    $img = imagecreatefromgif("someimg.gif");
    imagepng($img, "someimg.png");
    ?>

    If you run this code, using a valid gif image file, and a PNG version of that file is created, then it means the GD library is fine and there is likely to be something wrong with your code.
     
    Nythe, Nov 1, 2010 IP