Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   PHP (https://www.clubdelphi.com/foros/forumdisplay.php?f=15)
-   -   Creacion de GIF en php (https://www.clubdelphi.com/foros/showthread.php?t=58096)

4-stan-4 08-07-2008 16:32:09

Creacion de GIF en php
 
Hola, quiero crear una imagen a partir de dos imagenes.
La primera, el fondo, la tengo yo en mi ftp.
La segunda es de una web, que varia en funcion de unos valores que no importan.
El problema es que cuando lo intento hacer me sale estos errores:
Warning: Cannot modify header information - headers already sent by (output started at c:\archivos de programa\easyphp1-8\www\tufirma.php:2) in c:\archivos de programa\easyphp1-8\www\tufirma.php on line 3

Fatal error: Call to undefined function: imagecreatefromgif() in c:\archivos de programa\easyphp1-8\www\tufirma.php on line 7

Aqui el codigo:
Código PHP:

<?php
    header 
("Content-Type: image/GIF");
    
$bg ImageCreateFromGIF("img/bg.gif");
    
$nom 'kifow.';
    
$habbo ImageCreateFromGIF("http://www.habbo.es/habbo-imaging/avatarimage?user=".$nom."&img_format=gif");
    
imagecopy($bg,$habbo,0,0,0,0imagesx($habbo), imagesy($habbo));
    
imageGIF($bg);
    
    
ImageDestroy($bg);
    
ImageDestroy($habbo);
    
?>

la web es la correcta, esta comprovado por separado...

Gracias por la ayuda

luisgutierrezb 08-07-2008 17:50:55

Segun yo el header va despues de los ImageCreatefromGIF

4-stan-4 08-07-2008 18:05:02

Seh
Fue eso grasias que tonteria...

pero ahora continuan los problemas
Código PHP:

<?php
    $bg 
imagecreatefromgif("img/bg.gif");  //creo bg
    
$nom 'kifow.';  //defino $nom
    
$img imagecreatefromgif("http://www.habbo.es/habbo-imaging/avatarimage?user=".$nom."&img_format=gif");    // creo img
    
header ("Content-Type: image/GIF");  //le doy formato
    
imagecopy($bg,$img,0,0,0,0imagesx($img), imagesy($img));  // junto las dos imagenes...
    
imagegif($bg);  //...y la muestro
    
imagedestroy($bg); // elimino bg
    
imagedestroy($img);  //y img
    
?>

lo he releido muchisimas veces pero no entiendo donde falla porque es todo muy simple.

el resultado es el siguiente


gracias por la ayuda

4-stan-4 14-07-2008 18:46:23

Indignante no?
Bueno solo espero que respondan a mi mensaje y que borren este.
Gracias

dec 14-07-2008 18:50:36

Hola,

Cita:

Empezado por 4-stan-4
Indignante no?
Bueno solo espero que respondan a mi mensaje y que borren este.
Gracias

No sé si te refieres al "spammer" que ha puesto un mensaje en este hilo: ya están borrados sus mensajes y se ha "baneado" al "spammer". ¿Era eso?


La franja horaria es GMT +2. Ahora son las 12:08:26.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi