error with imagecopy!!!
Posted: Sat Jun 07, 2008 2:37 pm
hi friends
a question:
i want to fetch an image(type:blob) from sql database and then copy it to another image with imagecopy().i use this :
....$row=mysql_fetch_query($query);
$content=$row['image'];
imagecopy($image,$content,0,0,0,0,$w,$h);
imagejpeg($image);
(header is sent and $image made by imagecreate())
but the error says:imagecopy():supplied argument is not a valid image resource
why here is this error
is it nessasary that i first stor the image in a binary temprary file and then send it to the function???
regards
a question:
i want to fetch an image(type:blob) from sql database and then copy it to another image with imagecopy().i use this :
....$row=mysql_fetch_query($query);
$content=$row['image'];
imagecopy($image,$content,0,0,0,0,$w,$h);
imagejpeg($image);
(header is sent and $image made by imagecreate())
but the error says:imagecopy():supplied argument is not a valid image resource
why here is this error
is it nessasary that i first stor the image in a binary temprary file and then send it to the function???
regards