Outils pour utilisateurs

Outils du site


informatique:libgd

Ceci est une ancienne révision du document !


Table des matières

libGD

Librairie graphique GD.

Documentation

Examples

Fonts

essais_gd_fonts_01.php

Rendu
Source
<?php
error_reporting(-1);
 
$font = realpath(dirname(__FILE__)).'/comic.ttf';
 
$image = imagecreate(400,300);
$blue = imagecolorallocate($image, 0, 0, 255);
$white = ImageColorAllocate($image, 255,255,255);
 
$size = (isset($_GET['size']) ?$_GET['size'] :44 );
$text = (isset($_GET['text']) ?$_GET['text'] :'Hello, world !' );
$angle = (isset($_GET['angle']) ?$_GET['angle'] :0 );
$x = (isset($_GET['x']) ?$_GET['x'] :20 );
$y = (isset($_GET['y']) ?$_GET['y'] :150 );
 
imagettftext($image, $size, $angle, $x, $y, $white, $font, $text);
 
header("content-type: image/png");
imagepng($image);
imagedestroy($image);
informatique/libgd.1265201642.txt.gz · Dernière modification : 19/05/2012 00:15 (modification externe)

Sauf mention contraire, le contenu de ce wiki est placé sous les termes de la licence suivante : CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki