Ver Mensaje Individual
  #3 (permalink)  
Antiguo 10/03/2008, 16:43
cnyx
 
Fecha de Ingreso: abril-2004
Ubicación: Valencia
Mensajes: 436
Antigüedad: 20 años
Puntos: 8
Re: Como redimensionar imagenes con php

Hola, te agradezco tu respuesta.
Tengo una duda, encontre el siguiente codigo en la documentacion de PHP:

Código PHP:
<?php
// Variables que indican el archivo de la imagen y el nuevo tamano
$filename 'test.jpg';
$percent 0.5;

// Content-type para el navegador
header('Content-type: image/jpeg');

// Se obtienen las nuevas dimensiones
list($width$height) = getimagesize($filename);
$newwidth $width $percent;
$newheight $height $percent;

// Cargar la imagen
$thumb imagecreate($newwidth$newheight);
$source imagecreatefromjpeg($filename);

// Redimensionar
imagecopyresized($thumb$source0000$newwidth$newheight$width$height);

// Mostrar la nueva imagen
imagejpeg($thumb);
?>
He intentado implementar este, por parecerme mas sencillo que el tuyo, pero no he conseguido que funcione. Podrias indicarme porque puede ser esto, y cual es la diferencia entre el tuyo y este?

Gracias otra vez.

Saludos.