SitePoint Sponsor

User Tag List

Results 1 to 15 of 15

Threaded View

  1. #1
    SitePoint Enthusiast lix0r's Avatar
    Join Date
    Feb 2006
    Location
    Norway
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    imagecopyresampled issue

    I've made function that resizes a given image, but when I change imagecopyresized with imagecopyresampled I'm encountering some problems.
    In Firefox I get a download prompt for the php file I'm running. In IE it says I can't display the page.

    I use the folowing code:

    PHP Code:
    // create a new image-resource
    $thumb =  imagecreatetruecolor($new_width$new_height);
    $new_source imagecreatefromjpeg($source);

    // Creates the thumbnail
    imagecopyresampled($thumb$new_source0000$new_width$new_height$img_width$img_height);
    imagejpeg($thumb$target100); 
    If I change it back to imagecopyresized it works just fine. Anyone have any idea why this happens?
    Last edited by lix0r; Apr 17, 2007 at 10:26.


Bookmarks

Posting Permissions

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