FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Thumbnail errors....





Assiez
http://pastebin.com/690961

is my current code for generating thumbnails. It requires the GD library which I see is enabled here, http://frih.net/phpinfo

but when I run it, I get a lot of errors like the following, can someone help me with this?

Quote:
Warning: imagesx(): supplied argument is not a valid Image resource in /home/assiez/domains/vulcansforge.frih.net/public_html/PhotoOrg/pictures/art/thumbnail_generator.php on line 41

Warning: imagesy(): supplied argument is not a valid Image resource in /home/assiez/domains/vulcansforge.frih.net/public_html/PhotoOrg/pictures/art/thumbnail_generator.php on line 42

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/assiez/domains/vulcansforge.frih.net/public_html/PhotoOrg/pictures/art/thumbnail_generator.php on line 59

Warning: imagejpeg(): Unable to open 'tn_HouseTop.JPG' for writing in /home/assiez/domains/vulcansforge.frih.net/public_html/PhotoOrg/pictures/art/thumbnail_generator.php on line 64

Warning: imagedestroy(): supplied argument is not a valid Image resource in /home/assiez/domains/vulcansforge.frih.net/public_html/PhotoOrg/pictures/art/thumbnail_generator.php on line 67

Warning: imagesx(): supplied argument is not a valid Image resource in /home/assiez/domains/vulcansforge.frih.net/public_html/PhotoOrg/pictures/art/thumbnail_generator.php on line 41

Warning: imagesy(): supplied argument is not a valid Image resource in /home/assiez/domains/vulcansforge.frih.net/public_html/PhotoOrg/pictures/art/thumbnail_generator.php on line 42

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/assiez/domains/vulcansforge.frih.net/public_html/PhotoOrg/pictures/art/thumbnail_generator.php on line 59

Warning: imagejpeg(): Unable to open 'tn_P1010783.JPG' for writing in /home/assiez/domains/vulcansforge.frih.net/public_html/PhotoOrg/pictures/art/thumbnail_generator.php on line 64

Warning: imagedestroy(): supplied argument is not a valid Image resource in /home/assiez/domains/vulcansforge.frih.net/public_html/PhotoOrg/pictures/art/thumbnail_generator.php on line 67

Warning: imagesx(): supplied argument is not a valid Image resource in /home/assiez/domains/vulcansforge.frih.net/public_html/PhotoOrg/pictures/art/thumbnail_generator.php on line 41

Warning: imagesy(): supplied argument is not a valid Image resource in /home/assiez/domains/vulcansforge.frih.net/public_html/PhotoOrg/pictures/art/thumbnail_generator.php on line 42

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/assiez/domains/vulcansforge.frih.net/public_html/PhotoOrg/pictures/art/thumbnail_generator.php on line 59

etc....

JayBee
what image type do you use?
(jpg, gif, png ...)

you can use
Code:
$src_img=imagecreatefromgd2($name);

or
Code:
$src_img=imagecreatefromgd($name);



insted of (line 39,40)
Code:
if (preg_match("/jpg|jpeg/",$system[1])){$src_img=imagecreatefromjpeg($name);}
if (preg_match("/png/",$system[1])){$src_img=imagecreatefrompng($name);}



or you can use PHP Thumb() The PHP thumbnail creator
it is very good solution for thumbnail generating and caching
Related topics
Mess.be Thumbnail files
Frihost Forum Errors (30/08/2005)
Frihost Forum Errors (30/08/2005)
Frihost Forum Errors (30/08/2005)
Browser Errors..
Latest PHP install may cause phpBB to return errors...
Big Errors in Poins
The Perfect Audio Rips
Frontpage Errors
Warnings and errors...
Thumbnail
Thumbnail Code... not getting pictures...
Beaverland feedback please
problem creating on-the-fly jpeg thumbnails
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.