RE: [PHP] imagecopyresized problems

2002-09-09 Thread joakim . andersson
Hi, imagejpeg($dst_img); This actually outputs the image, so your result is not unexpected. Try this instead: imagejpeg($dst_img, /path/and/filename/to/newfile.jpg); Regards Joakim Andersson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] imagecopyresized() problems

2002-07-09 Thread joakim . andersson
Hi, Output the correct headers before you output the image ie header(Content-type: image/jpeg); imagejpeg($dst_img, '', 50); Remove all print statements from this code. You cannot output anything but the headers and the image itself. Use imagecopyresampled if you can. It gives much better

Re: [PHP] imagecopyresized() problems

2002-06-24 Thread Jason Wong
On Monday 24 June 2002 18:57, Phil Ewington wrote: Hi, I am trying to copy and resize an image using imagecopyresized() and cannot seem to crack it. Below is the code I am using, can anyone tell me why I keep getting and invalid image resource warning and is this the src or dest parameter

Re: [PHP] imagecopyresized() problems

2002-06-24 Thread hugh danaher
Don't know if this helps, but the following works on my system. Hugh ?php $picture=../photos/$userfile_name; $size=getimagesize($picture); $height=$size[1]; $width=$size[0]; $max=200; // maximum dimension if ($height$width) { $nheight=$max; $nwidth=$width/($height/$max); } else {