Ver Mensaje Individual
  #14 (permalink)  
Antiguo 17/04/2005, 10:30
mandys
 
Fecha de Ingreso: abril-2005
Mensajes: 18
Antigüedad: 21 años, 6 meses
Puntos: 0
Cita:
Iniciado por sebtev
Imprimir en pantalla o imprimir en papel?

Te paso el redimensionar.php original (el q uso yo, q esta actualmente en mi sitio y q funciona a la perfección, debes tener las librerías GD >2.
Código PHP:
<?
include("form.php");
$imagen = $_GET["imagen"];
$ancho = $_GET["ancho"];
$alto = $_GET["alto"];
$calidad = $_GET["calidad"]; //de 1 a 100
if(substr($imagen,-3) == "jpg" || substr($imagen,-3) == "JPG" || substr($imagen,-4) == "JPEG"){
$src_img = imagecreatefromjpeg($imagen);
}
elseif(
substr($imagen,-3) == "gif" || substr($imagen,-3) == "GIF"){
$src_img = imagecreatefromgif($imagen);
}else{
header("Location: $imagen");
}
$ancho_original = imagesx($src_img);
$alto_original = imagesy($src_img);
if(!
$alto){
$alto = ($ancho / $ancho_original) * $alto_original;
}
if(!
ancho){
$ancho = ($alto / $alto_original) * $ancho_original;
}
if(!
$calidad){
$calidad = 80;
}
$dst_img = imagecreatetruecolor($ancho,$alto);
imagecopyresampled($dst_img, $src_img,0,0,0,0,$ancho,$alto,$ancho_original,$alto_original);
header("Content-Type: image/jpeg");
imagejpeg($dst_img,'',$calidad);
imagedestroy($src_img);
imagedestroy($dst_img);
?>
Imprimir en patalla, como se si tengo las librerías GD >2 instaladas?? porque me da muchos errores el archivo, me imagino que es por eso