Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/09/2008, 01:33
Avatar de Capimaster
Capimaster
 
Fecha de Ingreso: agosto-2004
Mensajes: 494
Antigüedad: 19 años, 8 meses
Puntos: 2
Problema para redimensionar imagen

Tengo el siguiente scrip que he utilizado en varios sitios que he desarrollado, lo malo es que me encontre con un sitio donde no me funciona... y no se que es lo que paso... ojala alguien sepa algo sobre esto..

el erro que me da es
Cita:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Mi script es..
Código PHP:
<?php 
$anchura
=200
$hmax=200
$nombre=basename($_GET['imagen']); 
$datos getimagesize($nombre); 
if(
$datos[2]==1){$img = @imagecreatefromgif($nombre);} 
if(
$datos[2]==2){$img = @imagecreatefromjpeg($nombre);} 
if(
$datos[2]==3){$img = @imagecreatefrompng($nombre);} 
$ratio = ($datos[0] / $anchura); 
$altura = ($datos[1] / $ratio); 
if(
$altura>$hmax){$anchura2=$hmax*$anchura/$altura;$altura=$hmax;$anchura=$anchura2;} 
$thumb imagecreatetruecolor($anchura,$altura); 
imagecopyresampled($thumb$img0000$anchura$altura$datos[0], $datos[1]); 
if(
$datos[2]==1){header("Content-type: image/gif"); imagegif($thumb);} 
if(
$datos[2]==2){header("Content-type: image/jpeg");imagejpeg($thumb);} 
if(
$datos[2]==3){header("Content-type: image/png");imagepng($thumb); } 
imagedestroy($thumb); 
?>
__________________
http://www.elcapitolio.com.mx - Ocotlán, Jalisco, México