Hi!
I get a errormessage when I try to resize images I have in a directory.
First of all I do a SELECT from a MySql-db where I get the name of the files I want to resize, when I get these I try to resize them but I keep getting this message:
Warning: Supplied argument is not a valid Image resource in thumb.php on line 9
here's thumb.php code:
<?php
require("db.php");
$sqls = "SELECT cover, published FROM reviews ORDER BY published DESC LIMIT 5";
$mysql_query = mysql_query($sqls);
while ($rad = mysql_fetch_array($mysql_query))
{
$cover = $rad["cover"];
$size = GetImageSize ("siteimages/$cover");
imagecopyresized ("siteimages/temp/$cover", "siteimages/$cover", 0, 0, 0, 0, 100, 142, $size[0], $size[1]);
echo"<IMG SRC=\"siteimages/temp/$cover\"><br><br>";
}
?>
$cover is the image I try to resize.
What I'm I doing wrong?
Greatful for any help!