Re: funcion imagecreatefromgif()
| From: | Bhean ... | Date: | Tue, 10 Jun 2003 14:16:13 +0000 |
| Subject: | Re: funcion imagecreatefromgif() | ||
| Groups: | php.general.es | ||
| Request: | Send a blank email to general-es+get-37206@lists.php.net to get a copy of this message | ||
Como GIF ya no es gratuito, ahora no se pueden generar GIf, pero puedes
generar PNG's, igual o más potentes (capas, transparencias, etc) y
ademas es Open Source
Creo recordar que solo tienes que sustituir la palabra GIF por PNG, es
decir, imagecreatefrompng()
saludos...
imagecreatefromgif()
----- Mensaje Original -----
De: Alex Volkoff <alex.volkoff@terra.es>
Fecha: Martes, Junio 10, 2003 9:47 am
Asunto: Re: [PHP-ES] funcion imagecreatefromgif()
> Hola,
>
> Eso es que no está bien instalada la librería gd.
> En el phpinfo() te debería salir un apartado, si estuviera
> correctamente
> instalada.
> No encuentra la función justamente porque no encuentra ninguna
> biblioteca instalada que la incluya.
>
> Un saludo, Sasha
>
>
> Gustavo wrote:
>
> > *Acabo de hacer el siguiente script en php, para modificar el
> tamaño
> > de unas imagenes, pero no puedo usar las funciones imgecreate
> > se debe a que no tendre soporte para gd??? porque no dice que no
> la
> > soporta, sino que no la reconoce.
> > tengo gd-1.8.4-4
> > en phpinfo(); no veo nada que me diga si lo soporta o no.
> > Que puedo hacer??
> > POr las dudas aca esta el error y el script:
> >
> > Fatal error*: Call to undefined function: imagecreatefromgif()
> in
> > */prueba/liberty/public_html/rsize.php* on line *9
> >
> > <?php
> > /* Este Archivo Recibe Los Parametros $ruta,
> > Que Es La Ruta Interna De La Imagen En El Servidor,
> > Y Los Parametros $lim_ancho y $lim_alto
> > Que Se Refiere A los limites Alto Y Ancho De La mueva imagen.*/
> >
> > function thumbnail($ruta,$lim_ancho,$lim_alto)
> > {
> > $fuente = imagecreatefromgif($ruta);
> > $img_ancho = imagesx ($fuente);
> > $img_alto = imagesy($fuente);
> >
> > if ($img_ancho>$lim_ancho)
> > {
> > $ancho = $lim_ancho;
> > $alto = (($img_ancho/$lim_ancho)*$img_alto);
> > if ($alto>$lim_alto)
> > {
> > $alto = $lim_alto;
> > $ancho = (($img_alto/$lim_alto)*$img_ancho);
> > }
> > $imagen = ImageCreate($ancho,$alto);
> > }
> > else
> > {
> > if ($img_alto>$lim_alto)
> > {
> > $alto = $lim_alto;
> > $ancho = (($img_alto/$lim_alto)*$img_ancho);
> > $imagen = ImageCreate($ancho,$alto);
> > }
> > }
> >
> >
> ImageCopyResized
($imagen,$fuente,0,0,0,0,$ancho,$alto,$img_ancho,$img_alto);
> >
> > str_replace('.jpg','_med.jpg', $ruta).
> > imageJpeg($imagen,$ruta);
> > }
> >
> > thumbnail('/red_interna/personal/gustavo/cd/101.jpg',150,150);
> >
> > Gracias
> > Gustavo
> > *
> >
> >
> >
> > -----------------------------------------------------------------
> ----
> > Archivo On-line: http://www.phpes.com/
> > via news: news://news.phpes.com/
> > Manual PHP en español: http://www.php.net/manual/es/
> > Para dar de baja la suscripción, mande un mensaje a:
> > lista-unsubscribe@phpes.com
> >
> >
>
>
> -------------------------------------------------------------------
> --
> Archivo On-line: http://www.phpes.com/
> via news: news://news.phpes.com/
> Manual PHP en español: http://www.php.net/manual/es/
> Para dar de baja la suscripción, mande un mensaje a:
> lista-unsubscribe@phpes.com
>
>