Error using imagecreatefromjpeg
Posted: Thu Aug 20, 2009 10:27 pm
I've got this script that is supposed to resize an image. The first step is to create an image from the current image. Here is the code I'm using:
When I do this, it gives me the error:
Warning: getimagesize(Resource id #2) [function.getimagesize]: failed to open stream: No such file or directory in /home/loseelon/public_html/admin/test.php on line 6
The image does exist, and is a valid jpeg. I've tried several images and have ensured that it is valid. The value for $src is somehow coming out to be "Resource id #2". Any ideas on what I can do to get this working?
Code: Select all
$tmp_img = "tmp/1250822321.jpg";
$src = imagecreatefromjpeg($tmp_img);Warning: getimagesize(Resource id #2) [function.getimagesize]: failed to open stream: No such file or directory in /home/loseelon/public_html/admin/test.php on line 6
The image does exist, and is a valid jpeg. I've tried several images and have ensured that it is valid. The value for $src is somehow coming out to be "Resource id #2". Any ideas on what I can do to get this working?