Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

graphics prob, please help

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi!
When I run the Script ($input is a jpeg file) above I get this error message:

"Warning: imagejpeg: unable to open 'upload/Hallo.jpg' for writing in ..."

What's wrong? Please help
Bye and thanx
Zooomby

<?
$size=getimagesize(&quot;$input&quot;);
$w_original=$size[0];
$h_original=$size[1];
$breite_neu=100;

$imgA = imagecreatefromJPEG(&quot;$input&quot;);
$imgB = imagecreate(50,50);
ImageCopyResized($imgB,$imgA,0,0,0,0,50,50,$w_original,$h_original);

imageJPEG($imgB,&quot;upload/Hallo.jpg&quot;);
?>

 
There can be two problems here.
One u are using a wrong dir, thats why the file cant be found
Or two, u dont have the rights to edit the file.
Try using dir, to know in what directroy u are. And use umask to figure out ure rights for the file. mcvdmvs
-- &quot;It never hurts to help&quot; -- Eek the Cat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top