07/02/2013, 05:54
|
| | Fecha de Ingreso: agosto-2009
Mensajes: 8
Antigüedad: 15 años, 5 meses Puntos: 0 | |
Redimensionar imagenes, mala calidad !!! Hola, necesito reducir unas imagenes al 70% de su tamaño original
uso la funcion imagecopyresampled(), pero la imagen resultante es de peor calidad que haciendo lo mismo con Photoshop por ejemplo incluso usando 100% de calidad en el jpeg destino
el codigo es bien sencillo: $image_m = new SimpleImage();
$image_m->load( $path.$elemento );
$image = new SimpleImage();
$image->load( $path.$bigImage.'.jpg' );
$image->resize(round( $image_m->getWidth() * 1.07 ), round( $image_m->getHeight() * 1.07 ) );
$image->save($path.$elemento);
function resize($width,$height)
{
$new_image = imagecreatetruecolor($width, $height);
imagecopyresampled($new_image, $this->image, 0, 0, 0, 0, $width, $height, $this->getWidth(), $this->getHeight());
$this->image = $new_image;
}
, ¿ alguien tiene el mismo problema ?
gracias, Xavi |