LIBRAIRIE GD
Maractidus
Messages postés
205
Statut
Membre
-
Maractidus Messages postés 205 Statut Membre -
Maractidus Messages postés 205 Statut Membre -
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 !
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
A voir également:
- LIBRAIRIE GD
- Gd group c'est quoi - Forum Vos droits sur internet
- Librairie valentine wtf - Forum Programmation
- Librairie anspach tabac - Forum Consommation & Internet
- Librairie lame pour audacity - Télécharger - Création musicale
- Google gd media - Forum Consommation & Internet
3 réponses
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...
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...
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
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