Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/07/2011, 23:38
kh0d3x
 
Fecha de Ingreso: septiembre-2010
Mensajes: 48
Antigüedad: 13 años, 7 meses
Puntos: 3
imagecopyresized error

Hola, llevo horas lidiando con el error que me regresa imagecopyresized:

Código PHP:
Ver original
  1. $sizex = $_GET['x'];
  2. $sizey = $_GET['y'];
  3. $filep = $_GET['p'];
  4. $img_new = imagecreatetruecolor($sizex, $sizey);
  5. $img_ori = imagecreatefromjpeg($filep);
  6. imagecopyresized($img_new, img_ori, 0, 0, 0, 0, $sizex, $sizey, imagesx($img_ori), imagesy($img_ori));
  7. header('Content-Type: image/jpeg');
  8. imagejpeg($img_new, img_ori, 100);

En donde la url es:

Cita:
thumbnail.php?x=100&y=100&p=images/imagen.jpg
Error:
Cita:
Warning: imagecopyresized(): supplied argument is not a valid Image resource in C:\AppServ\www\thumbnail.php on line 8

Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\thumbnail.php:8) in C:\AppServ\www\thumbnail.php on line 9
Sinceramente ya no se cual es el error, espero me ayuden.

Gracias de antemano