filigrane a taille fixe gd php
Bonsoir à toutes et à tous
Voici mon problème je récupère une photo de taille variable , j'inclue une image en filigrane mais je veux que celui ci ne varie pas de taille (310 px, 46 px)
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
<?php
header("Content-type: image/png"); //la ligne qui change tout !
$fichier_source = "galerie/".$_GET['img']."/1.jpg";
$filigramme = "https://www.developpez.net/forums/images/Logo.png";
$exclusif = "https://www.developpez.net/forums/images/exclusif.png";
$im_source = Imagecreatefromjpeg ($fichier_source);
$im_filigramme = imagecreatefrompng ($filigramme);
$larg_destination = imagesx ($im_source);
$haut_destination = imagesy ($im_source);
$larg_filigramme = imagesx ($im_filigramme);
$haut_filigramme = imagesy ($im_filigramme);
$milieu_destination = $larg_destination / 2;
$milieu_filigramme = $larg_filigramme /2;
$bas_filigramme = $haut_destination - 46;
$x_destination_filigramme = $milieu_destination - $milieu_filigramme;
@imagecopymerge ($im_source, $im_filigramme, $x_destination_filigramme, $bas_filigramme, 0, 0, 310, 46, 50);
imagepng ($im_source);
?> |
Merci de votre aide