Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2005
    Posts
    1

    Unanswered: GD Image Creation

    Why am I getting nothing but jibberish with this code?


    Code:
    <?php
    
    $image = imagecreate(150, 150);
    $image = ImageCreateFromJPEG("skylaere.jpeg");
    $color = imagecolorallocate($image, 255, 255, 0);
    
    
    $ip = $_SERVER['REMOTE_ADDR'];
    
    
    imagestring($image, 5, 50, 50, "Your I.P.: " . $ip, $color);
    
    
    imagejpeg($image);
    
    
    imagedestroy($image);
    
    
    
    
    ?>

  2. #2
    Join Date
    Feb 2002
    Location
    San Francisco, CA
    Posts
    441
    You'll need to pass a MIME type to the browser first. Look up "header" on the php manual...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •