Hola
¿Existe alguna alternativa a la libreria GD para generar miniaturas desde el servidor?
A mi me salen con muy poca calidad... con esta libreria
| ||||
![]() pero porque dices que no son de buena calidad tus imagenes? Detalla un poco más tu problema porfavor. Existe un "herramienta" llamada imagemagick que te podria ayudar en esto. Saludillos. |
| |||
Re: ¿Alternativa a la libreria GD? La funcion que utilizo en GD es esta
Código:
La miniatura se genera con un ancho de 80, pero muy borrosa... function createThumb($image, $newname){ $size = getimagesize ($image); $height = $size[1]; $width = $size[0]; if ($width > $height) { $newwidth = 80; $newheight = round(($height*80)/$width); } else { $newheight = 80; $newwidth = round(($width*80)/$height); } $src = imagecreatefromjpeg($image); $im = imagecreatetruecolor($newwidth,$newheight); imagecopyresampled($im,$src,0,0,0,0,$newwidth,$newheight,$width,$height); imagejpeg($im, $newname,50); imagedestroy($im); } // FIN CREO IMAGEN MINIATURA |
| |||
Re: ¿Alternativa a la libreria GD? Código PHP: |
| |||
Re: ¿Alternativa a la libreria GD? Es mucho mejor poner la calidad a 90 que a 100, se reduce muchísimo el tamaño del archivo, y la pérdida es muy insignificante. Y más para una miniatura. |