Rechercher : dans
Par :

LIBRAIRIE GD

Dernière réponse le 3 déc 2008 à 14:30:40 Maractidus, le 23 nov 2008 à 19:18:17 
 Signaler ce message aux modérateurs

Bonjour, j'avais une question : http://www.commentcamarche.net/forum/affich 9487028 remplacer texte par image help
et on m'a dit d'utiliser gd j'ai suivi le tuto du site du zéro :
et il s'affiche :
Warning: Cannot modify header information - headers already sent by (output started at /home/web/clients/world-of-marco.hostarea.org/www/testgd.php­:9) in /home/web/clients/world-of-marco.hostarea.org/www/testgd.php­ on line 9

Warning: Cannot modify header information - headers already sent by (output started at /home/web/clients/world-of-marco.hostarea.org/www/testgd.php­:9) in /home/web/clients/world-of-marco.hostarea.org/www/testgd.php­ on line 11

Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg: JPEG library reports unrecoverable error: in /home/web/clients/world-of-marco.hostarea.org/www/testgd.php­ on line 12

Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: 'http://world-of-marco.hostarea.org//forum/images/smilies/A.­gif ' is not a valid JPEG file in /home/web/clients/world-of-marco.hostarea.org/www/testgd.php­ on line 12

Warning: Cannot modify header information - headers already sent by (output started at /home/web/clients/world-of-marco.hostarea.org/www/testgd.php­:9) in /home/web/clients/world-of-marco.hostarea.org/www/testgd.php­ on line 14

Fatal error: Call to undefined function imagejpg() in /home/web/clients/world-of-marco.hostarea.org/www/testgd.php­ on line 16

Que faire ??? Quel est le script pour remplacer "A" par l'image de mon site : http://world-of-marco.hostarea.org//forum/images/smilies/A.gif
mici d'avance !

VOICI MON SCRIPT UTILISER :

!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>aaa</title>
<?php header ("Content-type: image/jpg");
?><?php header ("Content-type: image/jpeg");
$image = imagecreatefromjpeg("http://world-of-marco.hostarea.org//forum/images/smilies/A.gif ");
?><?php header ("Content-type: image/jpg"); // 1 : on indique qu'on va envoyer une image PNG
$image = imagecreate(200,50); // 2 : on crée une nouvelle image de taille 200x50 // 3 : on fait joujou avec notre image (on va apprendre à le faire)
imagejpg($image); // 4 : on a terminé de faire joujou, on demande à afficher l'image
?>
</head>
<body>
<br>
</body>
</html>


Admin world-of-marco : Vive world of Warcraft !

Configuration: Windows XP
Firefox 3.0.4

Meilleures réponses pour « LIBRAIRIE GD » dans :
Librairies Javascript (Prototype/Scriptaculous/Yahoo UI, etc.) VoirPourquoi réinventer la roue alors qu'il existe une multitude de librairies offrant des fonctionnalités avancées ? Néanmoins, devant la multitude de librairies, il vaut mieux savoir en quelques lignes quelles sont leurs fonctionnalités, leurs atouts...
PHP - Génération d'images VoirPrérequis PHP permet de créer des images au format GIF à l'aide d'une librairie de fonctions prévue à cet effet. La librairie permettant de créer et manipuler des fichiers graphiques se nomme GD, ainsi, pour pouvoir utiliser ces fonctions il faut...

1

Alain_42, le 23 nov 2008 à 20:40:12

Bonsoir,

avant <?php header ("Content-type: image/jpg");

il ne doit y avoir aucune balise HTML

hors toi tu en as plein

ne mets pas <html etc...

Répondre à Alain_42

2

Maractidus, le 25 nov 2008 à 18:39:47

MErci cela a marché ( seul problème au lieu de l'image a.gif il s'affiche le lien de ma page convertit en image) mais maintenant je dois configurer le scrot pour que sois les internaute qui choisissent l'image à affiché :
Comme sur le site de cooltext :
On entre un, texte dans une boite de dialogue et on affiche le texte en image avec GD
mici de vos explications d'avvance !

esssayé sur : http://world-of-marco.hostarea.org/testgd.php Admin world-of-marco : Vive world of Warcraft !

Répondre à Maractidus

3

 Maractidus, le 3 déc 2008 à 14:30:40

Up plz ! Admin world-of-marco : Vive world of Warcraft !

Répondre à Maractidus